attr: Fix glib hash_table != NULL assert
Ticket attribute hash table is created only when some attribute exists.
If it doesn't, list and get operations were producing glib assert.
Patch adds check in attr_get and attr_list so hash table is used only
when it has been initialized.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>