Add tests for content dependant legend rendering (RFC101)

mapserver/mapserver#4713