Implementation of RFC101 content dependant legend rendering (#4713)

adds cgi modes maplegend and maplegendicon
allow changing legend label by url