WeWork Inc. is giving up space in two prime locations in Singapore, underscoring the company’s challenges in one of its most promising markets.