How does the recommendation for programming projects to use double for numbers unless explicitly stated as integer relate to resolving InputMismatchException errors, especially when transitioning from input.nextInt() to input.nextDouble(), and why is it important to differentiate between int and long?