Implements Kahan's versions of elementary complex functions…

…paying particular attention to behavior near branch cuts.

Functions: sqrt, ^, log, asin, acos, atan, tanh, asinh, acosh, atanh
Includes also the ssqs to compute the mod-squared of a complex number scaled by a power of 2 to avoid overflow/underflow
Issues
- The ^ function fails tests so is disabled for now.
- The log function works only for `Complex{FloatingPoint}`. Explicitly casting `{T<:Integer}Complex{T}` to floating-point `Complex` causes tests to fail.

Ref: [Branch cuts for complex elementary functions](http://people.freebsd.org/~das/kahan86branch.pdf)
Correctly detects for both underflow and overflow in ssqs
Fixes type error in log
Corrects underflow check
Adds edge cases for all except atanh, atan
Reorders tests
add eltype, last, and pop! for IntSet
a few other intset-related fixes and doc updates
add some IntSet tests
fix smallint -> BigInt conversions, especially BigInt(Int128)
fix #3032, bug in immutable constructor with too few args
factor: don't generate as many primes when doing trial division.
primes: implement and test prime stuff for BigInts [closes #3033]

It is not recommended to use this code to factor large integers. The
primality testing for BigInts calls GMP, so should be pretty good.
test/Makefile: allow mpfr to be tested in isolation.
factor: precompute and use a list of small primes as before.
pkg2 wip: refactor using fixed() instead of installed().

It stands to reason that we don't actually care about what is not
fixed when we're figuring out what should be installed.
Fix mpz_probab_prime_p call

The number of tests to use wasn't there. I'm using 25, as it is
the recommended amount, but now it is also available as an extra
argument.
Add tests to isprime(::BigInt)
Merge pull request #3038 from andrioni/master

Fix mpz_probab_prime_p call
add isqrt (integer sqrt), use it to improve factor() (#3035)
export primes
Merge branch 'master' of github.com:JuliaLang/julia
add hist2d function (2-dimensional histogram)
add powermod for BigInt
Stata performance tests (#3029)

Stata Julia
fib 5 0
mandel 14 0
quicksort 24 0
pi_sum 1054 15
pi_sum_vec 202 144
rand_mat_stat 53 40
rand_mat_mul 1664 252

TODO: It would be nice to combine both these files into one file.