Working with a friend can help keep you consistently productive. But not all friends are the right ones for the job.