Cache results of describe table query and fix critical bugs.

describeTable() function wouldn't have worked previously. Also actually
return cached result of query.

Also set cache object on DB object so it can use the cache.