MDL-36526 calendar: Convert webcal:// to http://
MDL-36526 calendar: Convert webcal:// to http://

Curl doesn't understand webcal, so needs to use http. Also fixed some
php warnings spotted during testing.

dilawar/moodle