Refactorings and improvements.
Fixes #503.
Migration fix.
Clean up..
Merge branch '3.0' of github.com:hazelcast/hazelcast into 3.0