Add __wt_cache_pages_dirty and make naming consistent.

Add calls to functions where needed.