X86-64 syscall numbers

This series starts implementing what I think @rocallahan was describing in his comments on #1206.  (Thanks for fixing up bustage as a result of that, btw.)  Ideally the commit messages for the individual patches should describe what's going on.
I think this should template over the class rather than the enum value, for consistency with other templated code.