Move code in treemap/management from __init__.py to util.py

Works around a problem building the production AMI, which has to execute a management command on a machine without a DB. Running a management command loads __init__.py, which crashed without a DB because there's a top-level import of models.