Change type parameter of AbstractDetector to T extends AbstractDetector<T>
If the user knows they have an AbstractDetector, they should be able to
call the withXxx methods any number of times.
Currently the following fails to compile because the type returned by the withXxx() methods is an EventDetector
AbstractDetector<?>d = ...;
To call the with methods multiple times you have replace `?` with `? extends AbstractDetector<?>` once for each time you plan to call a with method. Clearly this does not scale well and is bad API design. Changing the declaration of AbstractDetector to `AbstractDetector<T extends AbstractDetector>` would solve the issue and allow the earlier example to compile.
This change is backwards incompatible, so I'm making a note of it here util we are ready to include it.
(from redmine: issue id 389, created on 2018-03-07)