returned config is a complete copy or resolved config

If a client changes the returned config, it has no effect
on resolved config.

Refactored some specs and added test cases
fixed a bug in tcfg_get not using fully resolved config

added tests for the bug