WeWork’s rapid collapse comes to a close as the once high-flying startup declares bankruptcy with nearly $19 billion in debt