Trap CloudStorage specific errors as failure and fix delete_entry_and_gs_entry()
Trap CloudStorage specific errors as failure and fix delete_entry_and_gs_entry()

Trapping all relevant exceptions is important so that the entity can properly be
deleted after the exception is eaten. On the other hand we don't want to trap
'Exception'.

Also when DeadlineExceededError happens, make sure to have the task entry
retried by returning failure.

Fix delete_entry_and_gs_entry(), interestingly, ndb.delete_multi_async()
requires ndb.Key and not ndb.Model instances. Otherwise the exception looks
like:
  File main.py, line 200, in delete_entry_and_gs_entry
    entities_future = ndb.delete_multi_async(to_delete)
  File google/appengine/ext/ndb/model.py, line 3746, in delete_multi_async
    return [key.delete_async(**ctx_options) for key in keys]
  AttributeError: 'ContentEntry' object has no attribute 'delete_async'

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/17391008

git-svn-id: 8fa0a038c61565a87d0885d584517a2e12819dac@207434 0039d316-1c4b-4281-b951-d872f2087c98

luci/luci-py,luci/luci-py,madecoste/swarming,pombreda/swarming,madecoste/swarming,pombreda/swarming,luci/luci-py,madecoste/swarming,madecoste/swarming,luci/luci-py,pombreda/swarming,pombreda/swarming