Add onClickOutside event

Fixes #579.

Useful for dropdowns and the like. Perhaps the "best" way to support this use case is to support a cohesive layers API, but this is a fairly common request and I think a reasonable way to support it.