Merge pull request #1487 from velesin/has_current_user_tests

adds unit tests for Discourse.HasCurrentUser
Merge pull request #1484 from velesin/resolver_refactoring

refactors Discourse.Resolver
FIX: deleting a flagged post issue

cf. http://meta.discourse.org/t/deleting-a-flagged-post-issue/10061

The bug was only happening when you were about the delete the first post, which means deleting the entire topic.
FIX: Progress bar not updating properly sometimes
adds unit tests for Discourse.debounce