pdInput: implement DoubleClick event, switch to custom Button type

Finally, a double-click event that reports coordinates.  This is a big
help on the layer toolbox, which uses double-clicks to initiate layer
title editing.

This commit also redefines all Button instances using a new
pdMouseButtonConstant enum.  The enum has identical values to VB's
intrinsic MouseButtonConstant (e.g. Left = 1, Right = 2, Middle = 4),
but it also adds XButton 1 and 2 reports.  I'm not sure if this will be
useful for PD specifically, but if we ever need to check something like
x-button double-clicks, we can now do so.  Note that all functions that
report mouse buttons will now supply x-button data.

Finally, this commit includes fixes for a few dumb mistakes elsewhere in
the module.