Flash: Add support for sandbox detection

Also adds new event: `error[name='flash-sandboxed']`

Ref #511
Cleanup: Some refactoring of the `_addClass` and `_removeClass` methods

May fix #501
v2.2.0