Change the parameters AnnotationBasedInvocationHandler expects

Expect the first argument of the @UaMethod-annotated method to take an
InvocationContext object, which has a reference to the calling object
and a callback that can be invoked if the method needs to fail and
can’t throw a UaException.