EDIT
Okay, so the question is really about how to keep the temperature steady using a plastic bucket, so I'm reposting an alternate answer here, with my original response below.
Charlie Papazian's book also has an answer for this too. He suggests taking a large carboard box big enough to contain the bucket, and then placing the bucket inside the box and surrounding it with styrofoam. This can supposedly make a great insulated container.
He also suggests going to a fish market or seafood restaurant where they'll often have pre-fabricated styrofoam insulated boxes that can be super efficient at maintaining mash temps.
Hope this helps!
----------Original Response-------------------------------
If you're brewing beer and you've never read Charlie Papazian's "The Complete Joy of Homebrewing", I suggest going out and buying a copy before you do anything else. It is the bible of homebrewing and has a section including instructions on how to create a mash tun out of a bucket system. Though others probably did it before him, the system is known as a "Zapap" lauter tun after Charlie "Pap"azian.
Basically, you just drill a million holes in the bottom of a fermentation bucket. Then, this bucket sits inside your bottling bucket. The bucket with the holes in it will sit perfectly inside connector for the spigot and leave a couple inches of space for a "false bottom". And there you have it, a mash tun.
It's that simple, and from what I've heard it works really well. The main drawback is that it won't maintain a steady temperature in the way that a converted cooler will, so you may need to add hot water from time to time throughout the mash. I've heard that if you make bigger beers using a lot of grain that the grains help to hold the heat better, so it's actually easier to maintain mash temperatures with big beers than with session beers, etc.
Here is a website with some pictures:
http://www.mainebrews.com/news/2009/11/zapap-lauter-tun/
Eventually you'll want to get a converted cooler that will maintain a steady temperature over the course of an hour or more, but this is a good way to get into all grain brewing if you've been doing extract brewing and already have the equipment.