Simplify Is-prime function

https://github.com/tctcl/ballistic/pull/28