Changed signature of painters.html & painters.text

- Made the 2nd argument an DOM id rather than a member property name
(still default to `main`)
- Fixed code in Select to use the new `painters.html`
Use DOM id to manage parts

Moved `selectionLayer` out of a member property, use DOM id to retrieve
it to reduce memory leak risk
Moved lib & controlHelper require to top