Convert input processing logic to XS

Since we'll be getting a lot of pieces of input, and I'd like
to break up the code into logical subroutines when possible,
I'm doing this in XS.  This also has the added benefit of
porting this functionality to another language environment;
the C routines would "only" need their Perl-specific stuff
stripped out and replaced.
Ignore build artifacts