Ported is_prime function to Python3 and added its tests. Monor changes