added fixups to SAM parser

Now the SAM parser understands XF/FF, a handful strange conventions and
the old abuse of flags.