Add arg-sample code

@mjhubisz

This PR addresses issue #9 by merging the code needed for `arg-sample` into master.


nit: `snp_infile` isn't freed if there is an error here.  It looks like you could just allocate both `snp_infile` and `infile` on the stack and then deallocation would happen automatically when returning.