First, you need to really clean the caliper pistons. There is a good chance that you don't need to rebuild the calipers and master cylinder. Follow the instructions here to clean the pistons:
http://www.lyndallracingbrakes.com/service_tech.htm
Additionally, I like to lube the outside of the pistons with silicone caliper lube. Don't use brake fluid, grease, or moly caliper lube for the outside of the pistons. Brake fluid is hydroscopic, and will attract moisture outside of the caliper seals. Petroleum products are incompatible with brake fluid.
Here is the stuff:
http://permatexelite.info/permatex-24110-ultra-disc-brake-caliper-lube-8-oz-brush-top-bottle
If the caliper pistons are rusted, you will have to replace them and rebuild the calipers, otherwise just start with a good cleaning and lubing to get the function back. Of course, you should also flush the whole system out with new brake fluid.
As for the pads, just deglaze them by laying a sheet of 80 grit paper on a flat surface, and renew the surface of the pads. I like to chamfer the leading edge of the pads, too. Part of my process for doing brake jobs is also to coat the backside of the pads with Disk Brake Quiet. This is optional, but it does help prevent me from having callbacks due to noisy brakes.
As for the rear brakes, (drums I assume,) pull them apart and inspect. A lot of times you will get a little bit of rust on the drum, and the particles of rust will grind up into a fine polishing powder similar to rouge. It will polish the brake shoes and make the rear brake really suck. Clean it out, and use 80 grit emery to roughen the shoes and clean the drum surface. Pull out the actuation cam, clean it, and lube it lightly with moly caliper lube. Put a tiny bit of it on the cam surface where the end of the shoes sit, too.