Fixed a few bugs in bed2GR and added a feature to set chromosome lengths.

The function was not working properly if nfields was set to 3. Also I force
scan() to only read one record per line, so that nfields can be less than the
total number of fields in the bed file. This is useful for me because I have
mixed bed files where columns > 3 are of mixed types and not always present.

Setting the chromosome lengths of the resulting GRange can now be done by
specifying the short genome name e.g. "mm9", "hg19" or "dm3". You need to have
the appropriate BSgenome.* package installed already for this to work,
otherwise it will skip setting the lengths.

Also I reindented some of the code to use the 2-space indentation that is being
used throughout the rest of the gff.R file.