refactor cudaEvent usage

- add `CudaEvent` which is a wrapper for cudaEvent_t
- solve problem that `cudaStreamWaitEvent` was called too often
- EventStream: add function `waitOn(CudaEvent)`

This pull request minimizes the overhead of the event system. (~ 3-5%)