How MaraDNS' stores resource records

The way MaraDNS stores resource records is via two, yes, two hash tables.

One hash table has the authoritative resource records.  These are records
which are in local csv1 zone files.  These records never change once 
MaraDNS is started, and, as a result, are in a format which is optimized
for speed assuming static data.

The size of this hash table depends on the number of resource records in
zone files.  The more resource records, the bigger this cache.  In
the case of over 250,000 records, this cache can be 70 megs big.

The other hash table is the cache.  This is dynamic data (the reason for 
all the bugs between 0.8.27 and 0.8.33 was because I had to redesign the
hash to handle dynamic data), and the records in this table constantly
change.  In addition, all of the records in the cache are linked to
a bidirectional linked list, which is used to determine what records
to remove once the cache starts filling up.  

The algorithm which decides to remove records from the cache works like 
this:

* Every time we create a new resource record in the cache, it is 
  placed at the top of the list.

* Every time we access a resource record (or a nameserver referral),
  we move that record to the top of the list.

* When we remove records once the cache starts to fill up, we remove 
  the records at the bottom of the list.

This dynamic cache will never have more than maximum_cache_elements 
elements.

