Replace most print statements with logging

This almost means we don't need to use env['quiet'] or env['verbose']
any more, though there are still a few bits to track down and eliminate.

I've used logging.warning for the short output stuff - should probably
do a more interesting logging thing, with that stuff having minimal
formatting ...

And add a --log-to-file option to log everything to file, whether the
console output is quiet, verbose or neither.
Cleaning up after refactor so far

- stop using function names with leading underscore, as that is no
  longer how we work out whether the function is callable from the
  command line.
- delete tests for get_public_callables() as that function was deleted
- convert tests for link_local_settings() to the new manager class style
- actually call the function that checks settings.py references
  local_settings - when we split it out we forgot to call it
- remove env usage from rm_all_pyc, and thus from all of utils
Remove env from tasklib/database.py

We add the noinput as a base level object variable and pass project_name
into setup_db_dumps()  Also sort out any code that uses database.