Adding JSON response for ReST API

Adding Exception handlers for returning error HTTP statuses
Adding generic JSON response handler for success calls
Renaming __str__ method of models to "serialize"

All responses are now sent as JSON using jsonify() of Flask

Changing the way DAOs were returning data from getters - all getters
return either dictionary / list / string. This was done for easier
handling of response. Else the JSON response convertor will have to
determine the type eveytime and do necessary processing.

Renaming the ReST API routes end points to plurals
Adding route to get all posts for group

user can get all posts in a group by specifying the group id

Fixing bug in get_posts_for_froup()
incorrect use of "extend" in place of list "append"