Heavy quark potentials and hybrid mesons from SU(3) lattice gauge theory