I think 'religion is the opium of the people' cuts both ways. Politicians will push through popular socio-economic policies (e.g. gay marriage) in order to be able to get enough support to also push through their unpopular economic policies.
Yes, the resignation speech mentioned the equal marriage legislation and foreign aid specifically. I suspect that is a semaphore for the successor (who will be further to the right) to leave those firmly alone.