Fixed possible crash (pcre cache must keep permanent strings)
cleanup
improved system time function determination

It doesn't need to LoadLibrary and all that stuff every time, but
once on the first access. Also the functions which are not directly
used inlined now.