Refactoring - remove duplicated code in TextLayerBuilder

beginText() and appendText() in TextLayerBuilder.renderMatches() are identical except for adding an additional css class 'selected', which is superfluous anyway (callers that supply className already do that).