Do a null pointer check before checking whether a node is Media element

The previous change is: https://codereview.chromium.org/187193002/
However, RenderLayer's node can actually be NULL. Need a NULL check to avoid NPE

BUG=347843,350368

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168779 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Handle has_more correctly

Return callbacksId from WebFileSystem::readDirectory().
Add WebFileSystem::waitForAdditionalResult().
Rewrite DirectoryReader and DirectoryReaderSync.

BUG=347900
TEST=run_webkit_tests.sh http/tests/filesystem/\*
TEST=run_webkit_tests.sh http/tests/inspector/filesystem/\*

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

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