[Test] Fix popup_wait_big_image()
Improve multipage work support.

* Stability enhancement. Now manga mode will works properly even if failed to detect page count.
* Add manga detection. It adds .pp-mangawork class to popup root.
* Add book mode detection. It adds .pp-book-rtl or .pp-book-ltr class to popup root.