Fix parameter caching (esp. in regards to namespaces)

Hi,

This pull request addresses issue #351:

> Currently using getParamCached on a namespace results in:
> a) The parameter not being updated correctly when one of its childs changes.
> b) A memory leak where the value of the child is blindly stored into the g_params map (and never removed).