Fixed the issue of lost formatting information
Fixed a number of memory leak bugs
Moved commonly used functions to libelektra
Fixed issues discussed in the pull request
Fix merge conflict:

in tests/test_ks.c

Merges branch 'augeas-formatting' of https://github.com/fberlakovich/libelektra into fberlakovich-augeas-formatting
Closes #6

Fixed the issue of lost formatting information
Fixed a number of memory leak bugs
Moved commonly used functions to libelektra

See https://github.com/ElektraInitiative/libelektra/pull/6 for
discussion and fixes