Five Scottish councils have signed a £700m, 25-year deal to recycle landfill waste at a Viridor-owned plant.