Enable xvgr output and labels for g_principal

g_principal now writes proper xgr files instead of raw
data files, and the output has more explanatory axis
labels as well as legends for the data sets.

Fixes #609.

Change-Id: I1eb7914a25661734e6a95e70413194ef723f9635