Clean-up smw.util.tooltip constructor, improve jsduck, and add test

Change-Id: I4139f787a27d7a0d5d5a3e587726e25f6a9886bd