Performance: avoid unnecessary round trip to database for User entity

We are already caching the user's identity along with the auth token,
so no need to refetch.
Performance: Refactored site history rendering

Site history queries were being issued for every new
site selection, and far too much data was being sent over
the wire to render on the browser.

We purposely do not want to commit to making all sitehistory
offline, so there's no reason we can't render it on the server.

Also an opportunity to start moving towards the new model
on the server, because it simplifies dealing with properties:
instead of three seperate special cases for projects, partners,
locations, etc, we treat them uniformally as reference fields.
Removed unused GetReportDef command
Spike for calculated indicators
AI-438 : added expression to indicator definition
AI-438 : promise version of TableColumnData builder
AI-438 : typo
AI-438 : introduced column view providers
AI-438 : buildfix (replaced gwt incompatible methods with gwt compatible one)
AI-438 : added cache key to activity table which is changed each time site rows of that activity are changed (added/removed/updated)
removed redundant classes
AI-438 : refactoring
First version of datamodel code

This introduces the DataRecord, which is intended to be a layer
of abstraction lower than the FormInstance.

The idea is that we have a common structure for both Instances,
which have identity, as well as record-type structures such
as lat/long, date ranges, and other complex types.

The implementation here allows seamless use of the DataRecord-based
types across server/client. On the client, they are implemented
with JSOs and so "disappear" during compilation.

Because they are normal javascript objects, they can be painlessly
sent between main thread/worker, and stored in the indexeddb.

The other important element is the DataRecordBean generator, which
allows you to define interfaces like:

interface FormClass {

  Cuid getId();
  String getName();
  void setName();

  List<FormElement> getElements();
}

and use them on both client/server and get JSON-serialization
"for free" on the client, as they are really just plain old
javascript objects.

There is still some implementaiton to finish, but hopefully
we can begin to migrate a whole range of types to this
foundation and start to make real improvements to offline mode.
AI-438 : specify indicator technical expression via legacy ui
Merge remote-tracking branch 'origin/version3' into version3
AI-438 : added placehoder parsing to expr parser, e.g. {i1} + {i2}
AI-438 : sites-calculated-indicators.db.xml
AI-438 : fixed sites-calculated-indicators.db.xml
AI-438 : implemented calculated column view provider
Fixed database test fixture with out-of-order inserts leading to FK violations