[libc++][NFC] Move format_to_n_result.

Places `format_to_n_result` to its own file. While working on D112361 it
turns out the type will be used outside the format header.

Reviewed By: #libc, Quuxplusone, Mordante

Differential Revision: https://reviews.llvm.org/D113831

GitOrigin-RevId: 5baa4ee30b5c2d3920499d974c152525636ab8ac
5 files changed