implementation of distance from point to box;
works in any dimension;
added tests for 2D and 3D