Refactor into discrete chunks; add a $writes accessor to CachedResource

Addresses most of #24
Vastly improve goat test
Add count to write queue
Disabling cache for certain actions

Fixes #5, #22, and #20.