A man shouted "Allahu Akbar" ("God is greatest") before killing one person with a knife and attacking three police officers in eastern France.