Testing gluon self-interactions in three-jet events at hadron colliders