MT#5879 Default content on template creation and x- mimetype.

Store default template content on template creation.
Replace image/x-mimetype with image/mimetype to fix PDF generation.

(cherry picked from commit b2b108f9314466ff7073ecd4fcf1853aee1fd80c)

Conflicts:
	share/tools/generate_invoices.pl