Generates prime numbers indefinitely using the Java 1.8 Stream api for multicore threading and efficiency