indexStorage: putAttachment new API and qunit tests