I've seen many used Nissan Leafs being offered for a very low cost (as little as $6000 as of 2016), but I'm concerned about the lifetime left in the batteries of those cars. Nissan says that they will replace the whole set for $5499, but I don't trust that they will always do that, so I would rather be able to do this by myself using commodity parts, just in case Nissan change their mind. I know that this is possible on the Toyota Prius. Is there any resource on how to replace/rebuild the batteries in the Nissan Leaf?
Yes, they can be. You'll probably need to find a company that refurbishes batteries, there's one that I know of in Australia so I'd say (i.e. assume) that there would be services in your area.
If you're a bit handy with electrical work, I've seen some people set up arrays of smaller lithiums to achieve the desired outputs for EV applications.
It's not going to be "cheap cheap" regardless of what you do, but it can save you some money to fix up an older EV as opposed to buy new.
Unless you are an electrical expert with a shop and heavy equipment, it is difficult. The battery pack weights 600 lbs once removed from the vehicle. Then, you must have test equipment to check out the bad cells. Then you must have the parts to replace the bad ones. The good thing as to replacing with a new battery pack is that these will be the current production series, much better as to chemistry and physics of the battery. It brings the car to "new" specs and good for 8 eight years as these have a longer life than the 2011/12/13 series. I am replacing, at my own cost, the battery on my 2011 Leaf. Cheeers and good luck.