Pakistan beat India in Asia Cup thriller