Great Britain have taken a step closer to ending their 11-year wait for a Davis Cup title, as Leon Smith's side advanced to the semi-finals with a thrilling 2-1 victory over Germany.