Fix test failures in master

Issue 2492: Better way to test warnings
https://code.google.com/p/sympy/issues/detail?id=2492

Issue 3964: Test failure in master: __contains__ deprecated in test_finite_rv.py
https://code.google.com/p/sympy/issues/detail?id=3964