Rename core directory because of autoconf name clash

While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.

There's no workaround but to rename the core directory.
Implemented autotools based build scripts

supported options:

--with-dependency-search=DIR    will tell configure to look for various
dependencies in DIR/include and DIR/lib

Alternatively you can also specify libsodium header and libs location
with --with-libsodium-headers and --with-libsodium-libs if it is
installed elsewhere.

Ncurses and libconfig is handled via the default pkg-config way, see
./configure --help=short for detailed information.

The cmake build still works.
Integrated unit tests into the build system

Availability of "check" library will be automatically tested by
configure, if the library is not available tests will not be build.

Further, an option to manually disable/enable compiling of unit tests is
provided: --enable-tests / --disable-tests

To compile and run the tests use:

make check