Refactor methods of Semaphore class: down -> signal_p, up -> wait_v