Making Graphs Compact By Lossless Contraction