A man has been charged with five counts of attempted murder after a car hit a group of pedestrians in Nottinghamshire.