Magnetar oscillations - I. Strongly coupled dynamics of the crust and the core