Celtic restored their four-point lead at the top of the Scottish Premiership with a narrow win against struggling Kilmarnock.