Cleared compiler warnings, added some features/flags.

Changes were made to have mktorrent compile cleanly on both 32 and 64 bit
linux using the gnucc compiler with:
    CFLAGS="-O2 -Wall -Wextra -pedantic -std=gnu99"

It also compiles cleanly with:
    CFLAGS="-O2 -Wall -Wextra -pedantic -Wno-long-long"
which is without setting std to gnu99, but turning off warnings about the
use of "long long".

Features and flags added are:

  o Changed insert sort used to order files in the torrent from strcmp to
    strcasecmp. IE changed from a case sensitive sort to a case insensitive
    sort.

  o Changed code to choose the piece size based on the overall size of the
    torrent when the piece size is not user specified.

  o Changed to allow the specified output argument be a directory, in which
    case the filename is automated the same as if no output was specified,
    but put in the output directory instead of the current directory.

  o Added -f/--force flag to allow overwriting an existing torrent file.

  o Added -e/--extra file to allow adding extra non-canonical fields to the
    torrent's info dictionary.

This commit attempts to avoid random changes due to preferences in style,
whitespace, or anything not strictly necessary to add the new behaviors
listed. One exception is that DIRSEP_CHAR was removed from the code;
*DIRSEP or DIRSEP[0] is the same thing. Additionally most of this code was
formatted in the style of "indent -kr -i8", and I attempted to make all new
and changed code consistent with this, except where that style conflicts
with the existing code.

Previously, when compiled on 32 bit Linux without enabling USE_LARGE_FILES,
mktorrent would still work for torrents with a total size greater than 2GiB
(but possibly not more than 4GiB). Now, using the total size to decide the
piece length, the variable used to store the overall size needs to not
overflow. Therefore metafile_t.size and a couple counters in
hash/hash_pthreads modules needed to be changed from off_t to int64_t so
they would be 64 bits even on 32 bit architecture with 32 bit off_t, and
the printing of their data needed to use PRId64 from inittypes.h.

Some of the more minor changes to variable types were made to remove
compiler warnings that only show up when adding "-Wextra -pedantic" to
CFLAGS.

Details of the changes are:

mktorrent.h:

  Changed the version from 1.0 to 1-Current.

  Removed DIRSEP_CHAR; changed code in modules that include mktorrent.h to
  use DIRSEP[0] instead of DIRSEP_CHAR.

  Added a define of PROGRAM with value "mktorrent", and changed all
  printing to stderr statements that I touched to print PROGRAM: at the
  beginning of the first line of the error messages. Did not look for and
  change fprintfs I wasn't working with/around.

  Added defines of ONEMEG and BITXXMAX where XX is from 15 to 22.

  Added definitions of elist_s/elist_t.

  Added the "elist_t *extra" and "int force" to the metafile_t struct as
  well as changing "size" from off_t to int64_t. Changed "threads" from
  unsigned int to long as it is used to receive the result of sysconf,
  which returns a long.

ftw.c:

  Removed DIRSEP_CHAR; changed code to use DIRSEP[0] instead of
  DIRSEP_CHAR.

hash.c:

  Added include of inttypes.h

  Fixed a couple counter variables; 'r' was declared as ssize_t but should
  be size_t, and 'counter' was declared as off_t but needs to be int64_t.

  Changed fprintfs to use PRId64 instead of PRIoff for the variables that
  were changed from off_t to int64_t.

hash_pthreads.c:

  Same changes as hash.c, plus fixed another counter variable; 'i' needed
  to be an int, not an unsigned int.

init.c

  Added includes strings.h, for strcasecmp, and inttypes.h, for PRId64 etc.

  Added new function "realloc_str" to handle realloc error checking and
  make the code using malloc/realloc cleaner.

  Re-wrote "set_absolute_file_path" to handle the file path being a
  directory as well as a torrent file, and to avoid doing the stat when the
  output directory is the default cwd, while also avoiding the getcwd when
  the output directory or file is specified absolutely.

  The re-write changes the default string size used to handle the filename
  from 32 bytes to 128 bytes, so it won't need to realloc most of the time.

  The "extra" info dictionary fields are stored in a linked list; added the
  function "add_extra" to add a node to the list.

  Changed "process_node" to insert files using strcasecmp instead of strcmp
  so that directories of mixed and all lower case files such as
  Filename.S##E## and filename.s##e## sort in the order you'd want. The
  only downside is on operating systems with case sensitive filenames (ie
  unixes) if you make a torrent with two directories whose names are the
  same except for case, and they contain files that sort between each
  other, you get a very screwy ordering. This is a very unlikely case that
  does not have a quick, easy, small fix for this commit.

  In "print_help", segmented the huge long help string/printf into multiple
  printfs and strings due to compiler warnings when not using -std=gnu99.
  Added lines for the new options, and changed the one for piece length to
  indicate the default is based on torrent size instead of 2^18.

  Changed "dump_options" to handle the new and changed options.

  Added the function "print_extra" to be used by "dump_options".

  Changed the "init" function:

    o to have an array of maximum sizes for each piece length that can be
      automatically chosen, read and calculated from defines in the
      mktorrent.h file. For now changing the header file and re-compiling
      is the only way to change the schedule used to automate piece
      length selection.

    o added switch statement sections to handle the new command line
      options, added the new options to the OPT_STRINGs and long_options
      struct.

    o moved error check of user specified piece length to the switch
      statment section for 'l'.

    o added the code that determines the piece length when not user
      specified.

    o added some #ifdef DEBUG code to help figure out what was going on
      when m->size was overflowing on 32 bit Linux without LFS.

    o changed printf to use PRId64 instead of PRIoff for m->size.

main.c:

  Added strings.h, inttypes.h, and ctype.h to the ifdef ALLINONE section.

  Changed "open_file" to use different flags for the open call depending on
  if the -f/--force flag was specified or not (O_TRUNC vs O_EXCL).

  In "main", fixed the comments on the default values assigned to the
  metafile_t struct to be the same order they were defined in the header
  file. It already had the right number of data types in the right order so
  there was no error due to this discrepancy. Also changed the initial
  value of piece_length from 18 to 0.

  Changed the "print who we are" printf to use the new PROGRAM define instead
  of hardcoded "mktorrent".

  Changed the call to "open_file" to pass m.force.

output.c:

  Added include files stdlib.h and ctype.h.

  Added "write_extra" function to output.c to handle writing out user
  specified fields to the info dictionary.

  Added "is_bencode_int" function to determine if an extra field's value is
  a valid bencoded integer or not.

  Added an elist_t variable to write_metainfo, initialized to the value of
  m->extra. It is needed to walk the linked list while writing the entries
  and storing the progress between calls to "write_extra".

  Changed the "created by" string to be generated using the PROGRAM define
  instead of hardcoding "mktorrent".

  Changed the writing of the info dictionary to check for "extra" entries,
  and to print them sorted between the standard required entries via calls
  to "write_extra".

prefix.c

  Added some preprocessor commands and fprintfs for debugging and
  information gathering purposes, and changed all the printfs that were
  already inside ifdef DEBUG sections to be fprintfs to stderr so they
  don't break compilation when DEBUG is defined.