Nasim Aghdam bought the 9mm Smith and Wesson in January and used it in Tuesday’s attack that left three people wounded