Initialize all members, to reduce misleading valgrind reports
Add support for contextual WMS legend graphics (hub #11859)

Developed with funding from Regione Toscana SITA (CIG: Z410C90D94)