Fixed socket exception thrower

- Added missing parens to socket exception thrower and change logic so
  an empty-ish return value is not required to indicate failure.
exceptions.h tests, fixed JSON and PCRE macros

- Created unit tests for exceptions.h
- JSON error macro no longer assumes a return value can be used to
  indicate failure.
- PCRE error macro accepts an option to specify the return value that
  indicates something went wrong. Apparently some functions return null
  for an error while others return false.