Radicalized 20-year-old planned to ambush and kill men as they left synagogue; wanted to travel to Gaza and join Hamas