The militants attacked Bangladeshi police guarding the country's biggest festival where some 200,000 people gathered to mark the end of Ramadan.