Rewrite of the notifications system

It also reintroduces the possibility to turn auto-refresh on and off,
both with the constructor or setter.
Merge branch 'master' into ez-notifications-rewrite

Conflicts:
	realm/src/main/java/io/realm/Realm.java
Add migration methods with old signature
Change update checker frequency to once an hour
Merge pull request #516 from realm/tg-hourly-update-check

Change update checker frequency to once an hour
Update javadocs and changelog
Update changelog.txt
Adding tests for average of long and float fields. Use core's average_X
metods directly.
Removing not relevant code.
Making it easier to change the number of objects in RealmResultsTest.
Merge pull request #518 from realm/kg-average

Reimplementing average
Merge pull request #514 from realm/ez-notifications-rewrite

Rewrite of the notifications system
Merge branch 'master' of github.com:realm/realm-java into kg-bugfix-too-many-query-conditions

Conflicts:
	changelog.txt
	realm/src/androidTest/java/io/realm/RealmResultsTest.java