some improvements to work well with modern compilers
more compatibility stuff
improved a spec
added prime generation
include functional
Merge remote-tracking branch 'sergeych/master'

Conflicts:
	ext/ttcrypt/text_utils.h
fix c++11 flag