Modify median behavior

If median statistics is called for less than 3 samples, use mean
instead as exiting as a failure is a bit steep.
Include fixes in protocols
Add a until protocol that stops at either duration or iteration

fix some benchmarks that were failing before that.