added build script for cross compiling

simply run ./build.sh. the compiled binaries are stored in ./pkg
remove building struct stuff

no algorithmic changes, this is purely vanity.
i came back to look at this the other day and had a hard
time figuring out what the hell I had done. so hopefully this helps,
this uses parameters and returns so that each function's purpose
can easily be reasoned about from its signature. next time, smack me plz
Merge pull request #2 from roberthorn/cross-compile-script

added build script for cross compiling
Merge pull request #3 from rdallman/cleanup-mess

remove building struct stuff