Read gearman host/port from environment if not specified

This is more consistent with our other tools and makes it easier to run
gearcmd as the CMD argument in a dockerfile (because CMD doesn't run
through the shell and thus can't replace environment variables)
It'd be nice to factor out this repeated code, but it's short enough I don't think it's a really big deal.