YUI Module Rewrite

Converted the main pagehint javascript to work as a YUI Module.
Updated code to utilise html_writer correctly.
Updated DB query to pass attributes correctly.
Moved to more object oriented approach for hints between PHP and
Javascript.