Phytoplankton motility and the competition for nutrients in the thermocline