Introduce dynamic board size.

The goal is to eventually define the board's extent by the outline
layer, only. That way, all the exporters can export properly
sized layouts.

Undoubtly, this can also influence the GUIs. For example, "zoom to fit"
becomes a slightly different meaning and drawing outside the board's
extent becomes possible. Autorouting and similars can be limited to
the actual board size. Resizing a board to the lower left no longer
requires the error-prone moving of all the stuff and keeps file diffs
small.
gcode HID: make gcode_toolradius an int.

It's always used as such.
gcode HID: write board size according to dynamic extent.

This isn't much, so far, more on dynamic extent to come.
gcode HID: add header required for UpdateExtents().
make EPS boundingbox parameters integers Currently, the bounding box parameters given in the header of an EPS file are floats. The standard calls for integers, though. Some applications like epstool fail if the boundingbox is anything but integer. This patch uses llrint() to output the nearest integer as bounding box parameters. In addition, it adds a high resolution header for the benefit of applications that can use the extra precision.

 Example of the bounding box lines produced by the patch:
 %%BoundingBox: 0 0 370 426
 %%HiResBoundingBox: 0.000000 0.000000 369.503937 426.196850

 Closes-bug: lp-1035999
gcode HID: make G-code output aware of dynamic extents.

This also offsets the produced G-code so the rectangular edge
closest to {0, 0} in pcb is {0, 0} in the G-code. Very useful
when actually producing boards.

The most simple way to achieve this is to draw just the part
inside the outline into the intermediate image. No change to
the PNG tracer needed.

Unfortunately, this exposes a bug, making the traced PNG
image inverted. This will be fixed with the next commit.
gcode HID: fix the bug producing an inverted image.

For copying an pallette-based image, the pallette has to be
copied, too.
gcode HID: remove an untrue comment.

Actually, gdImageCreate() creates an pallette-based image.
gcode HID: simplify the backside flipping algorithm.

As the PNG has to be copied to a bitmap anyways, this can also
be used to flip the back layer.

The code flipping the PNG is still in place, but only needed
for the PNG written do a file (for error checking).
gcode HID: make usage of gcode_f local.

There's no need to keep a file open all the time, all the
processing is done in memory.
gcode HID: rename gcode_f2 to gcode_f.

... as there's no longer a gcode_f used.
gcode HID: release the PNG a lot earlier.
gcode HID: another few cleanups.
gcode HID: reorder user interface to a more logical sequence.

The new sequence is: general - isolation milling - drilling -
milling - output options.

Also completed the term "mill" to "iso-mill", as outline milling
is around the corner.

Default measurement unit changed to mm, as I'm not aware of a
single machine accepting "mil" as G-code unit.
gcode HID: create G-code for milling the outline of the board.

This is a rarther simple implementation, which mills a rectangle
with the maximum extents of the board.
gcode HID: correct a few comments.
gcode HID: fix a potential memory leak.
gcode HID: remove an unused struct.

The common HID code has now a better alternative, anyways, so
it's unlikely this will ever be used again.
gcode HID: move all the code common on file open into a subroutine.
gcode HID: add user defined feedrates for isolation milling.

This includes two new fields in the GUI, as plunging (moving into
the material) has a different feedrate from the normal feedrate now.
These different feedrates are needed by many tools, e.g. end mills.