Use syntax tables for SPIR-V 1.0 Rev3

- The SPIR-V spec generator has changed how it represents optional
  operands.  Now it tracks a separate boolean flag indicating optionality.
  However, SPIRV-Tools still wants to represent both operand class
  and optionality in the same enums space (SPV_OPERAND_TYPE_*).
  So there's extra work in the patch.

- In the spec generator, OperandImage is now OperandImageOperands.
  This affects enum translation in opcode.cpp.

- In the spec generator, image operands are explicitly followed by
  Id, and VariableIds.  However, SPIRV-Tools uses the bits set
  in the image operand bitmask to control the number and meaning
  of the Ids that follow.  So in writing the opcode.inc syntax
  table, drop all operands after OperandImageOperands.

- Some enums are now more explicitly represented in the generated
  opcode.inc:
    - AccessQualifier (e.g. on OpTypeImage), in both required and
      optional flavours.
    - MemoryAccess (e.g. on loads and stores)

- Add SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER

- Add tests for the optional AccessQualifier operand on OpTypeImage.

- Update the AccessQualifier test for OpTypeImage so it's a round
  trip test through the disassembler as well.
diff --git a/source/opcode.cpp b/source/opcode.cpp
index ab627ce..68c45bb 100644
--- a/source/opcode.cpp
+++ b/source/opcode.cpp
@@ -86,13 +86,6 @@
   // what is being repeated.
   if (operandClass == OperandOptionalLiteral) {
     switch (opcode) {
-      case SpvOpLoad:
-      case SpvOpStore:
-      case SpvOpCopyMemory:
-      case SpvOpCopyMemorySized:
-        // Expect an optional mask.  When the Aligned bit is set in the mask,
-        // we will later add the expectation of a literal number operand.
-        return SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS;
       case SpvOpExecutionMode:
         return SPV_OPERAND_TYPE_VARIABLE_EXECUTION_MODE;
       default:
@@ -121,8 +114,6 @@
       return SPV_OPERAND_TYPE_ID;
     case OperandOptionalId:
       return SPV_OPERAND_TYPE_OPTIONAL_ID;
-    case OperandOptionalImage:
-      return SPV_OPERAND_TYPE_OPTIONAL_IMAGE;
     case OperandVariableIds:
       if (opcode == SpvOpSpecConstantOp) {
         // These are the operands to the specialization constant opcode.
@@ -188,10 +179,9 @@
       // OpImageQueryFormat. It is not used as an operand.
       break;
     case OperandImageOperands:
-      // This is not used in opcode.inc. It only exists to generate the
-      // corresponding spec section. In parsing, image operands meld into the
-      // OperandOptionalImage case.
-      break;
+      return SPV_OPERAND_TYPE_IMAGE;
+    case OperandOptionalImageOperands:
+      return SPV_OPERAND_TYPE_OPTIONAL_IMAGE;
     case OperandFPFastMath:
       return SPV_OPERAND_TYPE_FP_FAST_MATH_MODE;
     case OperandFPRoundingMode:
@@ -200,6 +190,8 @@
       return SPV_OPERAND_TYPE_LINKAGE_TYPE;
     case OperandAccessQualifier:
       return SPV_OPERAND_TYPE_ACCESS_QUALIFIER;
+    case OperandOptionalAccessQualifier:
+      return SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER;
     case OperandFuncParamAttr:
       return SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE;
     case OperandDecoration:
@@ -220,6 +212,10 @@
       // and we can remove the special casing above for memory operation
       // instructions.
       break;
+    case OperandOptionalMemoryAccess:
+      // Expect an optional mask.  When the Aligned bit is set in the mask,
+      // we will later add the expectation of a literal number operand.
+      return SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS;
     case OperandScope:
       return SPV_OPERAND_TYPE_SCOPE_ID;
     case OperandGroupOperation: