Update arc.js

Corrected arcs drawing and extended caching logic to have a chache hit more often.
Function is more or less 20 lines of code shorter, but i really cannot figure out if this implementation has more calculation
than the previous. I couldn't manage to find the error in the old one, i had to overwrite it.

in the picture , the multi colored arcs, are all on cache it after calculating the red one.
It will happen rarely, but why miss it?

![image](https://cloud.githubusercontent.com/assets/1194048/3872575/c962a7c0-211e-11e4-9413-cd6faba2e113.png)
Merge pull request #1590 from asturur/Clean-fix-for-ar

Update arc.js