[#3005] Add model and API for following groups

This implements everything required at the model and API level for following
and unfollowing of groups, getting a group's number of followers or a list of a
group's followers, and getting the number of groups that a user follows or a
list of the groups that a user follows.

Tests need to be added.

Frontend for following groups needs to be added.

+ Add UserFollowingGroup model class and user_following_group_dictize().

+ Add "{actor} started following {group}" activity stream activity.

+ Refactor user_following_user_dict_save() and
  user_following_dataset_dict_save(), replace with a single
  follower_dict_save() that can be used for UserFollowingUser,
  UserFollowingDataset, or UserFollowingGroup.

+ Add follow_group() and unfollow_group() logic action functions in create.py
  and delete.py.

+ Add group_follower_count(), group_follower_list(), am_following_group(),
  group_followee_count() and group_followee_list() logic action functions in
  get.py.

  Also refactor some code in logic/action/get.py to remove duplication between
  follower functions.

+ Add convert_group_name_or_id_to_id() converter function

+ Add default_follow_group_schema()

+ Add migration script
[#3005] Add tests for follow group API

Also refactored some test methods to remove code duplication between
user, dataset and group follower tests.

I started getting DetachedInstanceErrors from SQLAlchemy. It happens
because the tests access the model directly and retain references to
model objects. No idea why it started happening now but wasn't happening
before. I've added an AttributeDict hack at the top of the file to
remove this without introducing too much noise in the diff. Will remove
the hack and fix it properly in a separate commit.
[#3005] Remove retained model objects from test_follow.py

This removes the AttributeDict hack introduced in the previous commit
(21429c6) and replaces retained model objects in the test module with
dicts so we don't DetachedInstanceErrors from SQLAlchemy.
[#3005] Add tests for group following on delete cascade
[#3005] Add group follow, unfollow and followers pages

These are not properly integrated into the frontend yet: no
follow/unfollow buttons on the group pages, no link to group followers
page, group followers page does not look right. But they work.
Added UI for the following/unfollowing of groups
Merged master
Fix after incorrect merge
Added activity stream to group front end
Added page title to the group activity stream page
[#3009] Fix dashboard activity stream auth

This is necessary groundwork for implementing #3009 (new activity
notifications).

Make dashboard_activity_list() return the dashboard activity stream of
the logged in user, rather than accepting the user id as a param and
letting anyone (even not logged in users) view anyone else's private
activity streams!

Lots of fixing up of test_activity.py to take account of this:
[#3005] Add num_followers to group_dict returned by group_read

So that templates can access a group's number of followers without
having to make another API call.
Fix a broken activity streams test
Added about page to groups and fixed the truncate error on group/read.html
Merge branch 'feature-3005-add-following-of-groups' of github.com:okfn/ckan into feature-3005-add-following-of-groups
[#3005] Add back c.group_admins on group read teamplate

It's used by the legacy templates to show a list of the group's admins
in the sidebar. Legacy templates do not support the new group admins
page. This fixes a frontend test that was failing while testing the
legacy templates.
[#3009] Initial implementation of activity streams on-site notification API
[#3009] Add c.new_activities to every page when logged in

Not sure if this is the best way to do this
[#3009] Add dashboard table migration script
[#3009] Mark activities as read on loading dashboard page