Replace bam2fq numbers with existing constants

bam2fq:
-Replace flag constants written as numbers like 0x40 with #defines
 from htslib/sam.h like BAM_FREAD1.
-Add per file copyright license (MIT).
Remove global variables from samtools view

view:
Removes the global variables and replaces them with a structure
containing the settings for a run.