add a auto-delete old event records method, that will prevent table sensorevent grows too large.