Bug fix in P2_thread()

Fix bug in while loop of P2_thread() and insufficient handling of if
(previous_prime == 2)
Refactoring
Add `--lehmer2' command-line option