Thousands of Indonesians have held rallies in cities across the country to protest a visit by the US president later this month.