Fixed bug in generating down_trylock, added tests trylock for mutex and semaphore