Fix WMS legends to be more complient with spec.

In particular, handle WIDTH and STYLE parameters and avoid passing
unnecessary parameters.