add standalone test program
Merge branch 'master' into dev/nn
include cstring
add standalone test program for nn
include stdexcept
use cmake to test
Merge branch 'master' into dev/nn

Conflicts:
	test/Makefile
add test of neuronnetwork
correct gradient
[DEBUG] typo of initialization of n
debug: wrong ln
Merge branch 'dev/nn' into dev/r-pkg
 [DEBUG] the lifetime of pointers is incorrect
add test for sparse matrix