vm: Move 'class method' members to header

It's pointless to keep them in a separate source file.

Signed-off-by: Pekka Enberg <penberg@iki.fi>
vm: Make method::matches() const

Signed-off-by: Pekka Enberg <penberg@iki.fi>