Rory McIlroy got his Open Championship off to the perfect start by making four birdies on the front nine during the first round at St Andrews.