Apparatus and method for estimating the possible input and output power of a secondary battery