Difference between WeakReference and SoftReference in Java