Rename clobber to mask
Move global constants before class definition
Add more information to instance info endpoint

Most of what we want is similar to the "form_extras" tags that we use in
our templates so part of this commit refactors for edits to share code
directly with the API.

This also fixes an bug where a model without an instance but with unit
data would crash the template tags.
Merge pull request #999 from ahinz/topic/add-more-info-to-api

Add more information to instance info endpoint
Mask unauthorized fields in api including UDFs

fixes #987 on github
Merge pull request #1000 from steventlamb/topic/mask_unauth_udfs

Topic/mask unauth udfs
Serialize values for DateFields differently than for DateTimeFields
Change date styling so that a full mm/dd/yyyy can be seen.  Fixes #895
Show Date Planted and Date Removed fields on tree detail, fixes #961
Merge pull request #983 from maurizi/topic/datePlanted

Show date planted and date removed fields
Properly return dictionary
Add safety code in plotMarker.js
Add MapFeature model

* Superclass for Plot (and, in the future, RainBarrel etc.)
* Has feature_type field, so generic searches can just query MapFeature rather than Plot, RainBarrel, etc.

Make temporary fields
* Make an explicit "Plot.mapfeature_ptr" field for migrations to use (it will become implicit once Plot inherits from MapFeature)
* Make a temporary "Tree.mapfeature" field for migrations to use (it will become Tree.plot)

Migrations
* Create a MapFeature for every Plot
* Make Plots point to their MapFeature
* Make Trees point to their Plot's MapFeature
Finalize Plot and Tree classes

* Plot inherits from MapFeature
* Delete Plot fields moved to MapFeature
* Tree.plot now points to MapFeature instead of Plot
Account for Plot's new multi-table inheritance in a few subtle places

These subtleties are from audit.py:
* get_id_sequence_name (used for pending audits, to get the next primary key for a table) -- the primary key of the Plot table is its foreign key to MapFeature, so use that.
* validate_foreign_keys_exist (used to process pending inserts) -- if we're creating a Plot we don't expect there to be MapFeature yet, so don't validate that foreign key.
* save_with_user -- when we plug in the "reserved model id" (provided by get_id_sequence_name) to an object we're saving we must set the "id" field in addition to the "pk" field (for the "Plot" case, where pk != id)

Also:
* Migrate the triggers (which update the geo rev hash when a plot changes) to use the MapFeature table instead of the Plot table
* Update a few tests