The previous check using `instanceof` fails in case the Choices.js
component is rendered in the `top` frame while the JavaScript actually
using Choices.js is in an iframe.
The conditions are changed to check for `constructor.name` now, solving
the issue.
Due to the rather messy constructor, some quirks like operational
chaining and explicit type casts need to be used to make the TypeScript
compiling process happy.
Fixes: #1057
* breaking test
* Remove ablity to pass multiple elements + tests
* Update readme
* Update README.md
* 🔖 Version 8.0.0
* Remove type definition hack
* Update coverage command
* Add some missing list tests
* Remove .only
* Update demo page to loop over elements
* Update constructor to set initialised flag if already active
* Make templates private
* Throw type error once if element is invalid
* Fix list children bug
* Re-add generic examples to index.html
* Housekeeping
* Use typeof instead of isType where applicable
* Remove isElement
* Add test for isIE11