I figured out how to do it! I think it is very useful so I'll explain what I did. You need BetterTouchTool which is free. Set up the action to close window under cursor and the gesture to be 3 finger swipe up, which makes it very intuitive because its just like throwing something away, just swipe up

Plus no other gestures are being taken up by 3 finger swipe up. It also works in mission control. Lets say you go to a website and 4 ads pop up. Mission control by 4 finger swipe up. go over the pop ups and swipe up with 3 fingers and it closes without exiting mission control so you can do it to all of em while in mission control. Enjoy!