The midnight voting tradition began as a way to accommodate rail workers who had to start their shifts before the polls opened