Add .gitignore files to the extras/ directory

extras/.gitignore:
    Mercury ignores the --use-{grade}-subdir dir
    Mercury/** for git 1.8+ this recursively ignores all build files
    ignoring *.mh and *.init files
    *.err output files
    lib*.{dll|so|a|dylib} ignores target compiler library output
    *.jar ignores the Java grade output
    *.exe for Windows executables

extras/dynamic_linking/.gitignore:
    ignoring the copy of dl.m, name_mangle.m
    ignoring hello lib and dl_test* executables

extras/moose/samples/.gitignore:
    ignoring cgram.m small.m alpha.m expr.m which are
    generated from the .moo grammar files

extras/graphics/mercury_cairo/samples/.gitignore:
    ignoring *.png output and all executables

extras/**/.gitignore:
    In each sample/test/example folder the linux executable/test
    output is ignored
fix extras/graphics/ examples

Replace all occurances of index0_det with det_index0 to make these examples
compatible with recent versions of Mercury.

extras/graphics/easyx/samples/bounce.m:
extras/graphics/mercury_allegro/examples/exspline.m:
extras/graphics/mercury_allegro/samples/demo/aster.m:
extras/graphics/mercury_allegro/samples/speed/view.m:
    As above.