Optimized is_ip dolibarr function

Little question: do we need to check if the IP is in a private range? It is not checked all over Dolibarr code.

Refactor Xhprof result:
![captura de pantalla 2014-07-17 a la s 21 13 36](https://cloud.githubusercontent.com/assets/168744/3618151/7fb13c90-0de6-11e4-8a92-50e2b4335edd.png)

Old is_ip Xhprof result:
![captura de pantalla 2014-07-17 a la s 21 13 42](https://cloud.githubusercontent.com/assets/168744/3618153/7fcc9fee-0de6-11e4-8e35-515eb351cbca.png)