initial work towards storing thumbnails

This is for layers only. There is no upload, only creation of a thumbnail from WMS reflector.

Some explanation:
1) I used md5 hashes to obfuscate the name since images are being served from media directory. In mapstory, I used a version on the URL so I could apply far-future expires. The hashed approach supports this as well, but...
2) because the URL changes each time the thumbnail is saved, it requires a CSW update to the cached metadata XML

I have not tested seriously at this point. Should discuss further at this point.