Maps of bounded variation with values into a manifold: total variation and relaxed energy