Added more unit tests. Improved interface for an internal call. Exposed more necessary calls for unit tests. Corrected a bug where times might get inserted out of order, breaking the guarantee of keeping data for at least a given time period. The correction introduces a slight loss of information for web sites with almost non-existent traffic where visits with different time values for the unit of interest (minute, hour, day, etc) are inserted out of chronological order.