Phoenix 180

First revision for review.  There are some open points here.  Still no test case added to consume the stats.  Will do the performance test once the system is available with me.
    We have the concept of a "minimum time to recalc stats" as a separate config and store the time when the stats were last calculated in the stats table.
So storing this in the stats table means per table again? So we will read the stats table and seeing the timestamp we will not further read the stats table and will become a NOOP ? Am i right?