Heartbeat of the Sun from Principal Component Analysis and prediction of solar activity on a millenium timescale