use QSpinBox for average edit box
move avg and marker buttons to next row in trace controls
remove repeated code
Merge branch 'ui-improvements'