Add autoclose option, pass chrome-remote-interface instance when
'pageEnd' or 'end' events come up.