Hooker Dan Sheehan has scored a hat-trick of tries as Ireland beat Italy 22-17 in Rome to keep their Six Nations title hopes flickering.