Leeds have reached the FA Cup semi-finals for the first time since 1987 after a remarkable end to their quarter-final against West Ham in London.