Tidy up observable model code generation

Also implement oldValue handling (which I forgot about).

Change-Id: I81b121df55f7e7b52c070e7dafae2aac6b677da5
Reviewed-on: http://gerrit.dmdirc.com/2942
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>