Issue #132: Move non entity related stuff to RestfulBase.

With this PR code is better structured and it opens the door to non-entity based endpoints (manual queries, views, …).

All that is not directly related to an entity has been moved to the `RestfulBase` class.

@amitaibu it should be pretty easy to review since I only did cut & paste and fixed the coupling with the render cache (and its tests).