validate bounds argument

There are very specific requirements for the bounds argument which must
be met in order for this to work – we need to know the position and
size of the required wrapping box, basically. Added logic to validate
at input that all pieces are present if the bounds argument is a simple
associative array, as well as a placeholder function to extract the
same info from any D3 selection; the latter will be fired if it’s a
numerically-indexed array.