Fix #854 state is required, assorted changes

- Removed required from state field in default user_meta config
- Setup profiler to use application_lang
- Indentation in application_lang and datatable_lang
- Template library:
- The library used 3 different methods of outputting debug messages
(echo, log_message, logit); created a function to consolidate debug
output, allowing echo to still be used but logging debug messages
regardless of whether echo is used
- block(): removed error check that would never be used: if
(empty($block_name) && empty($default_view)) after the method had
already returned if (empty($block_name))
- Reduced setting the view from if/else to ternary (?) operator
- In the spirit of the removed code, check to determine whether the
block and the default view are empty
- Sort module migrations on platforms that don't return the list of
modules alphabetically
- role_model
- can_delete_role(): we don't need to select a field we're not using
(and don't need to select it to use it in the where clause)
- delete(): don't turn off soft_deletes (if $purge) until after we've
performed basic checks that may return FALSE
- permission_model: mostly cleanup in the comments, reduced if/else
statement to ternary (?) operator in update()
- role_permission_model
- added private delete_for() method to consolidate functionality used in
the model's delete methods
- updated delete(), delete_for_role(), and delete_for_permission() to
use delete_for()
- modified set_for_role() to use insert_batch() instead of calling
insert() inside a foreach loop
- modified create(), set_for_role(), and assign_to_role() to use $this->
instead of parent:: for select/insert/find_all_by
- modified assign_to_role() and create_role_permissions() to use $this->
instead of $this->role_permission_model-> (I'm guessing these were
helpers at some point)
- modified find_all_roles() to load role_model rather than assuming the
model is loaded
Fix #558 Module Builder - show form validation errors at top of page (as well as inline)

Added Form Validation errors to an alert at the top of
modulebuilder_form