A rainstorm swamped the New York metropolitan area on Friday, shutting down parts of the city’s subway system, flooding streets and highways, and delaying flights into LaGuardia Airport. New York City and other parts of the state were under a state of emergency.