Changed wpseo_frontend_head_init hook from wp to template_redirect to prevent canonical redirect issues.
Fixes #859.
Added 999 priority to prevent wpseo_frontend_head_init running before another hook redirects the user on template_redirect.
Merge pull request #875 from Yoast/bug/change-wpseo_frontend_head_init-hook

Changed wpseo_frontend_head_init hook from wp to template_redirect to prevent canonical redirect issues.