WMS GetLegendGrapics: obtain legend graphics with no labels

This is the pull request with requested modifications, as requested by @mhugent.

The original was this:

https://github.com/qgis/QGIS/pull/1355