VE-1537: Respectively insert block or inline template (instead of always inserting inline)

This is a fix (sort of a quick fix) for a problem that is currently happening on production - and it will require further discussion with WMF guys.

https://wikia-inc.atlassian.net/browse/VE-1537
VE-1537: Added few comments.
VE-1537: Addressed JSHINT errors.
VE-1537: ,
VE-1537: Addressed all JSCS problems
VE-1537: SurfaceFragment welcomes chaining - so use it
VE-1537: Restore assignment to this.fragment because it is being used in ve.ui.Dialog
Merge pull request #4932 from Wikia/VE-1537

VE-1537: Respectively insert block or inline template (instead of always inserting inline)