Apple has been granted a patent for a sports camera, sending shares of GoPro into a tailspin.