select.c: Rename "Flag" to "select" for clarity.

This will help avoid confusion when adding a "flag" parameter to specify
which flag to check in SelectConnection().
select.c: Rename SelectConnection() to SelectByFlag() and add flag parameter
copy.c: Add mask_flags parameter to CopyElementLowLevel()

This avoids us needing to unset ExtraFlags separately in buffer.c
hid/common: Fix extents computation in nm units

We still had some fallout from the nm units conversion here, using MAXINT
rather than COORD_MAX for some bounds checking.

This was completely breaking the lesstif HID pinout preview window.
draw.c: Always draw pin / hole names when in pinout preview

This was removed a long time ago by mistake when refactoring some
of this drawing code, and causes missing text in the Lesstif HID
pinout preview.
mymem.c: Allow elements to exist independently of a buffer.

If the DataType pointer to GetElementMemory is NULL, we allocate
memory but don't add to the buffer's element list or counters.

This is useful as it will allow rendering of pinout previews without
needing separate (or static) memory allocation to hold the previewed
Element.
hid/gtk: Make the pinout preview element use dynamicly allocated memory.

By embedding the element structure in our data-structure, we were forcing
various element initialisation and copy routines to be require operating
on a pre-allocated ElementType - rather than just returning us a pointer
to a newly allocated ElementType.
AddElementToBuffer(): Let CopyElementLowLevel() create the element to copy into.
copy.c: Remove "Dest" variable to CopyElementLowLevel() function

We no longer require this, as all callers pass NULL in order that
CopyElementLowLevel() allocates memory for the new element.
parse_y.y: Pass NULL explicitly to CreateNewElement(), rather than via yyElement

This makes things clearer.
create.c: Remove Element parameter to CreateNewElement()

Lets always make a new element, not re-use old memory. It seems saner
to do this when we have an API with "New" in the name!

No callers use the facility to fill in a pre-allocated (or already used)
ElementType structure any more.
hid/gtk: Use common GL setup and teardown code for different expose paths
hid/gtk: (GL) Start with the stencil test disabled in all rendering

Keep the pinout preview and pixmap rendering paths as close as possible
to the main drawing window one. There was probably no real issue here,
but it doesn't hurt to be consistent.
hid/gtk: Disable GL alpha-blending for the pinout preview

We aren't using subcompositing for this, so don't alpha-blend.
hid/gtk: (GL) Disable scissor test for pinout preview widget.

The partial drawing is interacting badly with our double-buffering,
as we are not painting the entire buffer we are swapping onto the
screen.

I have left a comment and some debug code, as this may need revisiting
to address what is really going on here.
find.c: Refactor some duplicated code for adding objects to various lists
const.h: Fix flag documentation for the NOPASTE flag

We were listing the wrong flag value for this flag.
const.h: Re-indent flags with spaces, rather than tabs

Whitespace only change. Allows adding flags with longer hex-strings
without having to shuffle the indenting too much.
hid/gtk/gui-drc-window.c: Refactor unset_found_flags() to use ResetConnections()

There is a lot of code in this function which matches ResetConnections(),
we only need to take care of the undo buffer management at the end.
Add #define list of flags to unset when copying into a buffer

Previously, the removal of FOUNDFLAG was hard-coded in various places,
lets consolidate the location to one header file, as when we split the
FOUNDFLAG to differentiate logical and physical connectivity, we will
only have one location to update.