caps_hash: don't crash if FORM_TYPE has no <value>
caps_hash: don't crash if FORM_TYPE has no <value>

Previously there were a couple of ways this could crash:

* First, if you had a <field type='hidden' var='FORM_TYPE'> with no
  <value> child, field->default_value would be NULL so

      g_value_get_string (field->default_value)

  would critical and return NULL and then you'll be in undefined hell.

* Having fixed that, the code to sort data forms by FORM_TYPE would also
  crash because it happens before the FORM_TYPEs have been validated and
  used g_value_get_string() without checking and then strcmp()ed the
  possibly-NULL result.

I actually have a work-in-progress branch that makes this all a lot less
hairy by adding, among other things, a wocky_data_form_get_form_type()
function which can do the validation for us. But better to fix the
crashes before refactoring them away.

https://bugs.freedesktop.org/show_bug.cgi?id=61433

freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,noonien-d/wocky