Fix is_ot_font etc. macros

Since d59c66ad9b05e426b042727fe98208df81bb49f0 constructs like:

  if not is_ot_font()

were broken due to the lack of parenthesis, so to avoid the warning
(which is cause by Web2C inserting parenthesis unconditionally resulting
in double parenthesis in some cases), I moved most of the logic to the
C++ side of things simplifying the macro.