Clean _previousMessages when iframe is detached

Fixes #42