Tiled Galleries code reorganization

Reorganizes the code of Tiled Galleries so that different types of galleries have their own strategy objects, leaving the plugin file with less responsibility. HTML generation is also separated from the actual process of computing the layout (item dimensions and such) by passing layout details to templates and partial templates. 

See https://github.com/Automattic/jetpack/issues/512, which has open discussion that shapes the code reorganization.