A Spanish resort town with sprawling golf courses and tree-lined beaches has added another green site to its attractions: the world's first plant to convert sewage into clean energy.