India maintained their perfect record in the Champions Trophy with a rain-affected, eight-wicket win over already-eliminated Pakistan at Edgbaston.