Fixing non working autocomplete

The autocomplete field before was always searching for %, and not the
string written by the user.
Rewrite autocomplete query

Rewriting of the autocomplete query to follow Drupal coding standards.
And no need to use LOWER(). LIKE is already case insensitive in
utf8_general_ci.
Constraints check always delayed scripts 60 seconds

Fixing bugs in the constraints check which always delayed the script 60
seconds. Also includes a bit of code cleaning.
Fixing "invalid argument" error in element_children().

Fixing "Invalid argument supplied for foreach() in element_children()
(line 6400 of includes/common.inc).".

The error happens when one or more fields are disabled in the the
display settings.
Fixing undefined index notices in locale_field_entity_form_submit()

The unset of form fields is causing a notice from
locale_field_entity_form_submit() men locale.module is enabled.

This commit fixes it by setting the field acces to FALSE instead. It is
therefore also needed to set required = FALSE on the borger.dk URL
field.

Changing all form boolean fields to FALSE instead of 0 which is not
correct according to the official Drupal coding standards.
Fixing text formats

The previous code was using a non existing text format named
“plaintext”. In D7 core is the plain text format using machine name
“plain_text”. This commit fixes this problem, and makes it possible to
overwrite the text formats used.
Merge pull request #1 from beltofte/master

Merging changes from master to develop