Nidal Hasan is set to become the first person to be executed by firing squad by the US military since 1945.