Police have shot four men dead during an attack on a police headquarters in Pekanbaru on Sumatra island. The third Islamist militant assault in Indonesia in the past week also left an officer dead and two wounded.