refactored client side Model and Meta - frappe/frappe#478
#478
frappe/frappe#478
frappe/frappe#478
frappe/frappe#478
Changed creation, modified format frappe/frappe#478
Merge remote-tracking branch 'frappe/develop' into model-cleanup

Conflicts:
	erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
	erpnext/controllers/stock_controller.py
Replaced doc, doc.fields frappe/frappe#478
frappe/frappe#478
frappe/frappe#478
frappe/frappe#478
frappe/frappe#478
frappe/frappe#478
frappe/frappe#478, frappe tests pass, .txt renamed to .json
frappe/frappe#478 added test_records.json
frappe/frappe#478, removed instances of .fields
frappe/frappe#478
frappe/frappe#478 fixed todo and renamed hooks
frappe/frappe#478
Merge branch 'model-cleanup' of github.com:frappe/erpnext into model-cleanup