Remove unused code from tool/main.py

Removed unused threading/os code from tool/main.py and
tool/mocktool.py.

BUG=None

Review URL: https://codereview.chromium.org/563533002

git-svn-id: svn://svn.chromium.org/blink/trunk@181807 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Adjust DrawingBuffer's visibility tracking behavior with lost context

This patch adjusts DrawingBuffer's behavior when a context is lost in
two ways:

1. Always tell DrawingBuffer whether it is visible or not regardless of
   whether the WebGL context is lost. This is needed because visibility
   notifications may arrive from the browser while the context is lost
   and the compositor may also attempt to composite the DrawingBuffer
   during this time.

2. Don't check the current visibility in
   DrawingBuffer::prepareMailbox() if the DrawingBuffer is being
   destroyed. This is because the DrawingBuffer may become hidden right
   before the context is forcibly lost (using WEBGL_lose_context), and
   after that point WebGLRenderingContextBase no longer has a reference
   to the DrawingBuffer to update its visibility state.

BUG=411372
TEST=Added in https://codereview.chromium.org/560023002

Review URL: https://codereview.chromium.org/556303002

git-svn-id: svn://svn.chromium.org/blink/trunk@181808 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web SQL: Remove unnecessary abstraction.

This CL merges
 - AbstractSQLStatement into SQLStatement
 - AbstractSQLStatementBackend into SQLStatementBackend
 - AbstractSQLTransaction into SQLTransaction
 - AbstractSQLTransactionBackend into SQLTransactionBackend
 - DatabaseBase into Database.

'Sync' versions of their subclasses were removed. These abstract classes are
unnecessary.

BUG=397429
TEST=none; No behavior changes.

Review URL: https://codereview.chromium.org/561143002

git-svn-id: svn://svn.chromium.org/blink/trunk@181809 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web SQL: Make sure DatabaseManager is used only in the main thread.

Only DatabaseManager::closeDatabasesImmediately could be called in non-main
threads. However, it just calls
DatabaseTracker::closeDatabasesImmediately(). This CL removes
DatabaseManager::closeDatabasesImmediately, and only the main thread uses
DatabaseManager.

So, we can remove DatabaseManager::m_contextMapLock.  We still need m_contextMap
because the main thread can have multiple Documents.

Oilpan: We can use PersistentHeapHashMap, and remove some |#if ENABLE(OILPAN)|.

BUG=347902,397429
TEST=No new tests because of no behavior changes.

Review URL: https://codereview.chromium.org/567453002

git-svn-id: svn://svn.chromium.org/blink/trunk@181810 bbb929c8-8fbe-4397-9dbb-9b2b20218538