Don't publish samples if resource_id in missing

In swift API, the user can call uri without the resource_id.
This patch skip the samples publishing instead of raising the
exception:

Traceback (most recent call last):
File "ceilometer/objectstore/swift_middleware.py", line 109, in iter_response
    bytes_sent)
File "ceilometer/objectstore/swift_middleware.py", line 160, in publish_sample
    resource_id=account.partition('AUTH_')[2],
AttributeError: 'NoneType' object has no attribute 'partition'

It print the exception of the samples publishing failure instead of
raising a exception to never break the swift API.

Fixes bug #1223259

Change-Id: I5d90fa620c8f8ea82e86524b9703049257ca0345
(cherry picked from commit e52e5070b3e0fb8c71e806eda036631e25628800)
Merge "Don't publish samples if resource_id in missing" into stable/grizzly