Error-handling for the case Ajax receiver server returns unsuccessful responses.
error handlings moved to _handleErrors function
success case processings all mvoed to _handleSuccess
use global variable and make xhr closure