Connor McDavid capped his hat trick with an empty net goal as the Edmonton Oilers beat the Calgary Flames 5-2.