Console: Simplify registerFunction

It seems like it's possible to call methods via Reflect.callMethod
without specifying their object (and passing null instead), which
simplifies the process of registering a function as well as the call()
logic.