Issue #3773: Error in acos(x).rewrite(atan)

acos().rewrite(atan) returned an error whenever the argument being passed was outside (-1,1]. This prevents symbols from being rewritten to atan. The function was changed to match the rewrite in asin.

A test was added to test_trigonometric to ensure acos(x).rewrite(atan) returns 2*atan(sqrt(1 - x**2)/(1+x))