Texas man convicted of killing officer, then attacks bailiff