Filters issues by state via API
Post comment when hit close/reopen btn in comment form

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'comment-and-close' into 'master'

Comment and close

Fixes #1240

See merge request !1055
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Merge branch 'api/issues-filter-state' into 'master'

API: Filter issues by state

While working on [laboard](https://gitlab.com/jubianchi/laboard) I had some issues with the API : I was not able to filter issues by state so I had to write some logic to do it on my side.

I think it will be useful to have this feature supported by the Gitlab API, moreover, the MR API already provides such filter capabilities.

I added the filtering logic on `/issues` and `/projects/:id/issues`.

The commits are not squashed but I'll do it once everything seems ok to you.

See merge request !168