It is a high thermal conductivity grease to ensure that the thermostat is in good thermal contact with the boiler. Typically they are silicone based so relatively non-toxic, but it's best to handle it wearing gloves. If you replace the thermostat, you will also need to replace the grease.
Yes, there are two torx screws on the top down those horrible 5cm holes. I used a specially long set of rachet bits that I bought on Ebay, but you can use a proper torx screwdriver. They really don't want you to get inside!