A man accused of carrying out a mass stabbing attack on a train in Cambridgeshire has pleaded not guilty.