Order, frustration, and defects in liquids and glasses