Tidy up randomcompanions, extend lua

This tidies up randomcompanions. Adds a couple new lua functions, merge
and inarray. Moves the command line binding to console.lua.
Mainly coding standard related

General cleanup
Coding standard fix