Dean Shiels hit a hat-trick as Rangers eased to a 4-0 victory over League One rivals Dunfermline at Ibrox in the fifth round of the Scottish Cup.