Non-Deterministic Planning with Temporally Extended Goals: LTL over Finite and Infinite Traces