Castleford Tigers end their four-game losing run with a five-try, 30-8 thrashing of struggling Leeds Rhinos.