Add AMF export.

This is mainly the export part from the AMF pull request by Mark
Cooper (https://github.com/openscad/openscad/pull/94) with a small
bugfix and a convert function to export from PolySet too.