N.J. school district fires teacher who joined Army, lawsuit alleges