VID-2008 Don't show add photo button when new galleries are enabled
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
VID-2008 Updated conditional formatting
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)
VID-2018 merging into dev
Merge pull request #4924 from Wikia/VID-2008

VID-2008 Don't show add photo button when new galleries are enabled
Merge dev, 1 conflict:
extensions/wikia/MediaGallery/scripts/controllers/index.js