cluster/afr: Propagate EIO on inode's type mismatch

        Backport of: http://review.gluster.org/8574, and
                     http://review.gluster.org/8586

Original author of the test script:
            Pranith Kumar K <pkarampu@redhat.com>

Change-Id: I0c32bdd8e666f8175c0a8fbf940934e6ce469931
BUG: 1136830
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8706
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>