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
That's a good point. This wasn't central to my current use case (I think the xforms we look up pretty much always exist), but it could be nice to have in the future. I'll fix this.