Autoclose option for the modal popup

Fixes #287 by checking if 'autoclose' option is set outside the mousedown/touchstart callback and not checking for the 'modal' option
Autoclose option for the modal popup

Autoclose false by default for modal popups.