Add system for parsing header into list of libraries.

Add system for parsing bam headers into a list of libaries, internally this is a hash table,
but the way this is written that is not exposed.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Make rmdup use new rg->library index and comment

Add comments to rmdup
Make rmdup use the new rg->library index.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>