Allow eventListener predicate to be any callable, not just closure

Before this change, the predicate parameter passed in to ClientImpl::registerEventListener had to be a closure/anonymous function because of how it was consumed in ClientImpl::dispatch. This change modifies the dispatch method to consume the predicate in a way that allows any callable to be used as the predicate.