Support for modal (alerm/confirm/prompt) APIs.

## Motivation

New pull-request of GH-266 .

:memo:  I used [znz:manipulate_dialog_boxes](https://github.com/znz/poltergeist/tree/manipulate_dialog_boxes) as reference. Thanks @znz !

## Remaining tasks

I think that remain some tasks to merge this branch to master. Example, Support Capybara 2.3.

Currently, this branch fail test for `window_xxx` APIs.
About these tests, I thought it would be resolved by GH-513.
So, I'm waiting merged this branch.

After merge GH-513,  I will do merged that branch to this branch, modify the test, and other tasks.
I just meant the blank line 9 can be removed since line 10 is already there and blank. Line 8 can stay as you've written it! :) Didn't mean the wrapping that GitHub added.