A general Fredholm theory I: A splicing-based differential geometry