Due to the lack of a return, there was a case where an invalid ARN
could cause a dereference of an uninitialized boost::optional.
As a bit of defensive programming, restructure a couple functions to
make that kind of error impossible by ensuring the optional is only in
scope when it is initialized and relying less in early return on
error.
Fixes: http://tracker.ceph.com/issues/21962 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>