Fix compiler warnings and few bugs.

Fixes for lots of compiler warnings, make compilation with -Wall much less
chatty.  Also fix some bugs that were flagged up by the warnings.

The changes to remove warnings are:
  * Added missing include files and prototypes.
  * Fixed lots of signed / unsigned issues, especially for char types.
  * Ensure indexes into look-up tables are unsigned
  * Removed redundant variables.
  * Assignments used as truth values.

A notable change is that confidence values are now type int8_t instead
of char.  They need to be signed as log-odds scores can be negative.

The other fixes are:

caf.c            - removed use of isblank (requires C99)

consensus.c      - misplaced bracket in get_uniqueness.

export_contigs.c - in sam_depadded_cigar, fix use of & instead of &&

newgap5_cmds.c   - In tcl_reformat_sequence, set default max cut-off to 127.
                   This is consistent with using signed confidence values.

tg_anno.c        - delete_tag_single_contig no longer tries to carry on in
                   the fact of errors.

tg_tcl.c         - Wrong parameter index used for l.score in ADD_LINK case of
                   contig_cmd
                 - sequence_cmd cases GET_CONF and GET_CONF4 now return
                   a ByteArrayObj instead of a StringObj.  This stops Tcl
                   from trying to interpret negative confidence values as
                   UTF-8 characters.



git-svn-id: https://staden.svn.sourceforge.net/svnroot/staden/staden/trunk@3149 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1