Improve tooltips

Allow tooltips in div element (currently tooltips only allow items in pre element which is tricky to format). Also fix wrapping, remove gradient fill, and introduce a maximum width of 500px by default.
Responded to suggestions by nightwing

Removed style changes (no style changes are part of the PR).

Only change now should be that we create a <div/> element instead of a <pre/> element.
Merge pull request #2189 from takapa/master

Improve tooltips