A unified approach to generalized inverses of linear operators: I. Algebraic, topological and projectional properties