How can I safely collect and store water for extended periods of time?
Your catchment and cistern (the part that's open to air and thus to contamination by insects/bacteria) should be as small as it can be while still providing enough capacity to take in the rain as it falls. Once rain enters the cistern from the catchment, it should then be pumped into a holding tank which is air- and water-tight, and from which you draw your water for general use. That way, water doesn't stagnate in the cistern. To make this work properly, you'll want a drain in the cistern. Normally the drain would be kept open to prevent standing water in the cistern between rains. When rains start, the first few minutes' worth should "wash" the catchment and cistern relatively clean of contaminants like dust, pollen, bird doo, etc; then the drain can be plugged and water diverted into the holding tank. You can do this manually, or set up some sort of rain-sensing system that will control the drain for you.

Once water is in the holding tank, a small amount of antibacterial and algaecide agents will keep it clean. Iodine kills both bacteria and algae, and you need to take in a little of it anyway (good for the thyroid), but the water will smell a little funny, will not be suitable for laundry (iodine permanently stains cotton and most fabrics so over time your whites will become yellow) and too much iodine can be poisonous. Chlorine is a no-brainer antibacterial but is less effective against algae except in large (harmful) doses, and will also make for funny-smelling water. 

You could consider a saltwater chlorination system. These systems use a small amount of sodium chloride (3.5g/L is the threshold for human perception of salt by taste; saltwater systems generally work with salt concentrations between 2-3g/L) along with electrically-charged plates to create free chlorine ions that disinfect the water. Saltwater chlorination is used for pools to avoid chloramines ("combined" chloride compounds, which give the water that distinctive smell) and similar systems are available for producing potable water.

Understand that any chlorine-based disinfecting system can produce "disinfection by-products" that can be harmful; however these are mostly a concern in large pools where lots of people are shedding organic material (bacteria, dead skin, etc) that forms the raw materials for these by-products. Rainwater that you're not swimming in, and that you're actively keeping new contaminants out of, shouldn't have this problem. Despite that, you can also consider a simple carbon filter coupled with a UV sanitizer; these systems are also commercially available for water sanitization in systems like yours.

Lastly, you'll need to keep the bottom of the tank relatively clear of sediment. The easiest method in an above-ground tank is to have a drain at the bottom which you can open for a short time to flush sediment. The next-easiest way is to vacuum it, just like you would a pool. Every few years you may want to drain the thing completely at the end of the dry season and give it a scrub, to clean off scaling and other build-up.