Tiled Gallery: Extract method in gallery item.

Extracted the basic nested element structure building in the tiled gallery item class to a separate method.