Replaced own bool typedef with <stdbool.h> where available

Fixes bugreport:7645
http://hercules.ws/board/tracker/issue-7645-rev-12302-compiler-error-and-warnings-on-gcc-49

Special thanks to Takkun for VS2012 testing

Signed-off-by: Haru <haru@dotalux.com>