Support enums defined in C++ code.

This allows listing an enum in an extern "C" block as well as in the
shared block.  In this case, we do not emit the C++ declaration of the
enum but instead emit static assertions that it has the values that we
expect.
diff --git a/macro/src/expand.rs b/macro/src/expand.rs
index e67902b..1a23960 100644
--- a/macro/src/expand.rs
+++ b/macro/src/expand.rs
@@ -7,6 +7,7 @@
 };
 use proc_macro2::{Ident, Span, TokenStream};
 use quote::{format_ident, quote, quote_spanned, ToTokens};
+use std::collections::HashSet;
 use syn::{parse_quote, Error, ItemMod, Result, Token};
 
 pub fn bridge(namespace: &Namespace, mut ffi: ItemMod) -> Result<TokenStream> {
@@ -39,12 +40,22 @@
         }
     }
 
+    let mut enums = HashSet::new();
+    for api in apis {
+        if let Api::Enum(enm) = api {
+            enums.insert(&enm.ident);
+        }
+    }
     for api in apis {
         match api {
             Api::Include(_) | Api::RustType(_) => {}
             Api::Struct(strct) => expanded.extend(expand_struct(strct)),
             Api::Enum(enm) => expanded.extend(expand_enum(enm)),
-            Api::CxxType(ety) => expanded.extend(expand_cxx_type(ety)),
+            Api::CxxType(ety) => {
+                if !enums.contains(&ety.ident) {
+                    expanded.extend(expand_cxx_type(ety));
+                }
+            }
             Api::CxxFunction(efn) => {
                 expanded.extend(expand_cxx_function_shim(namespace, efn, types));
             }