add rust_trylock_little_lock

Try to acquire lock and succeed only if lock is not already held.
Uses TryEnterCriticalSection or pthread_mutex_trylock.
auto merge of #10428 : toffaletti/rust/try_lock, r=alexcrichton

I need try_lock for an algorithm I'm trying to implement in Rust.