Only start mongod and rabbitmq if necessary.

On Ubuntu, installing these packages starts them immediately so there's
no point starting them in the install and init scripts here. On Mac the
situation is a little more complex because it's a manual step to make
something installed from homebrew run as a service. Account for both
cases in the scripts.