Fix build with rust master

Mostly the new namespaced enums and coercion rules. hashsum still broken due to pending rust-crypto update.