Use an oil based undercoat to cover such stains, before emulsioning over. I've used this technique a number of times and it really works, much cheaper than buying a 'stain block' product.
As for the cracks you can fill them, but they will probably move again.