Previously this could only be done by implementing a trait, like
`AddAdditionalMethods`, that that has an add_methods function where you
can put your custom methods. With this new attribute you can pass in a
register function directly!
This time with a bit more though put into the design of the code, as a
result the macro should be a lot more robust.
This did result in the macro getting renamed from LuaDevice to Device as
this should be _the_ Device macro.
The attribute also got renamed from traits() to device(traits()) and the
syntax got overhauled to allow for a bit more expression.
This can be very useful if you want to convert a data struct to a lua
table without having to write the boilerplane (however small it may
be).
It also adds the macro on several state structs so they can be
converted to lua in the upcoming ActionCallback refactor.