Improved handling of frozen objects

Calling to_api on a frozen object would fail because of an internal
cache that is set during the conversion to a hash. This change fixes
that in the case where no to_api_filter is being used.

In order to fix it altogether much of the library will need to be
rewritten to pass along the filter data from method call to method call
instead of setting a value on the object.