Fix bad merge of PR 44

Add refresh method to resources/collections.

This enables us to, for example, call client.applications.refresh()
after we have deleted one application so that we can refresh the cache.
Added Mock and Httpretty tests.

Fix cache issues. Make sure we always use the cache when accessing object data.
We assume the cache is fast.
Merge branch 'fix_bad_merge' into id_site_impl