French prosecutor opens terrorism probe after beheading