add metaconfig sane_template tests
add fixes and unittests to support ncm-metaconfig