trace: separate trace event control and query routines from the simple backend