Java bindings: more overloading of reserve_instances() function to allow passing special instance callbacks.