Check if SplineChar defines a fg layer before trying to iterate its refs

Fixes segfault due to invalid access of sc2->layers[] in FVApplySubstitution().
Unknown function/script-file should be reported in the context of the caller.

This results in a more useful error message containing the filename
and line number at which the attempted call was made.
Added SelectGlyphsSplines and SelectGlyphsReferences scripting functions
Added ChangeWeight scripting function.
Allow bItalic() to take a second argument for the xheight percentage.
If script filename doesn't exist, look instead for one ending in .ff
or .pe
added .d files to .gitignore
added VERSION to .gitignore
Added fontforge/FontForge.app to .gitignore
Added AnchorPoint define to avoid name clash on Mac
libspiro requires libmath
Fix apparent typo in call to utf82u_strncpy.

The original author must have meant ubuf+1 and not ubuf-1, in order to
preserve the space previously inserted at index 0 of ubuf[].
Fixed bSmallCaps() to use position_maps and actually work.