Fixed problems with id_property - user defined primary keys

* Tested with example/blog rails application, see comments
* Updated docs and example global configuration
* Fixed bugs found when running from rails and JRuby
* Made it possible to configure id_properties from your config/application.rb

Closes #354