Store layers and load modules according to layer configuration

Note that the test methods should be removed for direct manipulaiton
of buxton as it's an unreliable measure, making it virtually impossible
to debug using strace, etc.

This commit also ensures we dup the strings so that we're not trying
to access free'd pointers from iniparser.We should also plan some
exit methods to call the various _free functions for lists and maps,
ensuring all memory is free'd.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>