if baseParams has a FORMAT key, and the url contains FORMAT already, prevent that we have duplicate FORMAT parameters in the url, e.g. ArcGIS Server will not like this and will return an exception
implement @ahocevar's review/rewrite
Merge pull request #84 from bartvde/legendformat

if baseParams has a FORMAT key, and the url contains FORMAT already, pre... (r=@ahocevar)