Transformed cache line lock to be a counting semaphore

Since we now support multiple concurrent accesses to cache lines,
a pattern like this could break things...

contention_cache_line_lock(cache_page);
contention_cache_line_lock(cache_page);
contention_cache_line_unlock(cache_page);
contention_cache_line_unlock(cache_page);

The first unlock() would unlock the line rather than the second as
desired.

This change adds lock_count to the cache_line class and uses it to track
the number of outstanding locks. Now, contention_cache_line_unlock()
doesn't unlock the line unless the lock_count is 0.