WeWork seeks bankruptcy protection, a stunning fall for a firm once valued at close to $50 billion