Added __enter__ and __exit__ to Pin, to support with on inputs, outputs and lights