Try bounding indices in bdf->glyphs by bdf->glyphcnt in order to avoid crashes.
Add additional guards copied from @tshinnic.
Add more bitmap guards.
Remove a duplicate call to BCPrepareForOutput.
Move header offset calculations to the block of code in which the pointers are known to be valid.
Experiment with making bitmap import more consistent between interactive and scripted sessions.
Merge branch 'master' into issue_1603_frank_exploration_1

Conflicts:
	fontforge/parsettfbmf.c
Merge pull request #1660 from fontforge/issue_1603_frank_exploration_1

Be more careful when referencing glyphs in a sparse bitmap font.