Pierre Gasly finished third on the road but was demoted to seventh after two five-second penalties for pit lane speeding were applied.