Added SQL functions that returns proper json
condenser_api:
account_history_api:
Addresses issue #15 (closed) This is also prerequisite for next stage of PostgREST integation (which will mostly reuse here done implementations).
rebased onto: !11 (merged)