aggressively cache LazyAttachmentDoc attachments

both in local memory and in memcached
(and carefully invalidate the cache)

in the case of commcare hq's app builder (currently the only client of this code),
this saves the web worker from fetching the same attachment many times in the same request
and from fetching the same attachment between requests when it hasn't changed
Could either of the above two lines, particularly `content = self.fetch_attachment(name)`, fail (raise an exception) and therefore cause a request to repeatedly hit the database for the same attachment? Would it make sense to store a "content not available" value in the cache to prevent that from happening?