Real-estate companies are transforming suburban residences and retail spaces into offices, betting that the pandemic will increase demand for workspaces in these neighborhoods.