Companies are moving away from just outsourcing rote tasks to remote workers and toward building entirely distributed teams.