(CFACT 92) Refactor the api using cfact structure.

This patch refactors the kstat API calls, introducing a wrapper around it.
The data-structure k_stat is a wrapper around kstat_t calls, which looks up
a section from the kstat chain. The section is represented by kstat_entry,
which can be further used to lookup attributes defined within the section.