Merge branch 'master' into build-msvs2010-upd

Conflicts (resolved):
	sgminer.c
Fixed missing realloc removed by mistake.

Conflicts (resolved):
	sgminer.c
Fixed le25todouble() casting.

Conflicts (resolved):
	sgminer.c
VS2010 build: added sleep/usleep macros
VS2010 build: Prepared jansson for VS compile.
Fix build error in changed compat/jansson-2.5/src/dump.c (missing 'struct').
VS2010 build: Added library building instructions.
VS2010 build: Static pthreads compiling and linking.