Refine half and bool compatibility.

Use __fp16 for half if available.
Use <stdbool.h> for bool.
Merge pull request #2 from Realeyes/master

Refine half and bool compatibility.