Added support to custom sqls for rules, indexes and triggers

Minor fix on index editing form layout

Added a field on all object's editing form to expose the object's
internal id

Minor fix on model validation process.