Add is_failed/2 with backward compatibility

Stream management specification says:
"If the server does not recognize the 'previd' as an earlier session (e.g., because the former session has timed out), it MUST return a <failed/> element, which SHOULD include an error condition of <item-not-found/>."

Now is_failed/1 checks for <unexpected-request/> only.
This PR adds is_failed/2 with additional argument and keeps is_failed/1 for compatibility.