There should be the ability to add modules in the client javascript. It would make the piwik.js much easier to maintain and extend.
The client modules would be things such as:
Outbound link tracking
Click tracking for heatmaps
Displaying information in the pages being tracked
The modules will be able to hook in various points during execution:
'run' - as soon the script is run
'load' - as soon the DOM is loaded
'log' - when an action is logged
'unload' - when script is unloaded
About the packer/compiler:
There should be a php script that takes the base piwik js along with any js modules and joins/packs/minifies them in one file.