Allow window handles to be longs as well as ints

This change allows window handle values to be of int and long types,
whereas previously only the int type was allowed. Window handles under
64-bit Windows can be of the the long type.

This change improves handling of invalid handle value types. It
raises a TypeError with a descriptive string instead of simply
asserting the type check.

This change adds a test verifying correct behavior for various handle
value types.

Resolves #2.