Fix: CPLocale should not use navigator whithout checking if it exists

Previously, navigator was assumed to be there.
Fixed: Crash with rhino in fontinfo due to missing import

fontinfo's Jakefile needed to import SYSTEM to call SYSTEM.env
Fixed: CALayer was not rhino compliant

As it wasn't used anywhere in the code, some #if PLATFORM(DOM) were missing.
This commit add some checks here and there to ensure a correct initialization of CALayer