bundlestate: new function

This is not finished because I'm unable to test on Mac OS X (error: 

```
duplicate symbol _DEFAULT_CONTAINER_CAPACITY in:
    ../libutils/.libs/libutils.a(json.o)
    ../libutils/.libs/libutils.a(json-yaml.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
)

Thus the acceptance test is not finished and the code may be slightly broken, but I hope the general idea is acceptable: this function allows all the variables of a bundle to be returned in a single data container, formatted correctly (especially nested data structures).