fix sqlimpl._to_dict for empty list in attributes
fix sqlimpl._to_dict for empty list in attributes

if code passes User object to '_to_dict' method
then '_to_dict' fails. It happens because User object can have
empty list of pubkeys. And code fails because it tries to access
element[0] of array.

Change-Id: Ie1e052442dff71a6fc6d9680ef0e6b9ed57fd9e4

openstack/refstack,openstack/refstack,stackforge/refstack,stackforge/refstack,openstack/refstack,stackforge/refstack,openstack/refstack,stackforge/refstack