OR-905 updated filestore API
OR-905 Fix request middleware bug
OR-905 Update the code base to be compatible with new API
OR-905 Update avatar storage
OR-905 Set the file name in the filename property

This follows the MongoDB GridFS storage specification
http://docs.mongodb.org/manual/reference/gridfs/#gridfs-files-collection
OR-905 ensure Attachment reference (_id) is an ObjectId
Merge pull request #653 in OR/rse from ~MBAILLY/rse:OR-905-fix-esn-module-filestore-api to master

* commit '1f750d61e8a2b99bf2797164175eac334b8087bf':
  OR-905 ensure Attachment reference (_id) is an ObjectId
  OR-905 Set the file name in the filename property
  OR-905 Update avatar storage
  OR-905 Update the code base to be compatible with new API
  OR-905 Fix request middleware bug
  OR-905 updated filestore API