Let hb_shape() guess script and direction...

- Rename HB_SCRIPT_INVALID_CODE to HB_SCRIPT_INVALID

- Add HB_DIRECTION_INVALID

- Make hb_script_get_horizontal_direction() public

- Make hb_shape() guess script from buffer text (first non-common
  non-inherit script) if buffer script is set to HB_SCRIPT_INVALID (this
  is NOT the default.)

- Make hb_shape() guess direction from buffer script if buffer direction
is set to HB_DIRECTION_INVALID (this is NOT the default.)

- Make hb-view.c set INVALID script and direction on the buffer.

The above changes are meant to make hb-view fairly useful for uni-script
uni-direction text.  The guessing behavior however is NOT the default of
hb_shape() and must be asked for explicitly.  This is intended, because
the guess is not a suitable substitute to full-fledged bidi and script
segmentation.  It's just a testing tool.
diff --git a/src/hb-common.h b/src/hb-common.h
index 1dd02cb..ebb10b3 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -78,7 +78,8 @@
 typedef void (*hb_destroy_func_t) (void *user_data);
 
 typedef enum _hb_direction_t {
-  HB_DIRECTION_LTR,
+  HB_DIRECTION_INVALID = -1,
+  HB_DIRECTION_LTR = 0,
   HB_DIRECTION_RTL,
   HB_DIRECTION_TTB,
   HB_DIRECTION_BTT