Added an optional 'entity_type' variable to forms so the forms API could more easily work with entities without duplicating too much code. Created the new functions: drupalgap_entity_build_from_form_state, drupalgap_entity_form_submit, drupalgap_entity_get_edit_object, drupalgap_entity_get_primary_key, drupalgap_entity_load_into_form. Consolidated down the node create/update and comment create/update down into a much cleaner, re-usable code, which uses the new entity functions just created. We'll be able to use this for taxonomy, users and files, as well.