Feature/money refactor

Refactores some money features, solves partly #7 issue mentioned by @camspiers 
Haha, yeah I see what you mean. The context where it has been useful for me
in the past, is having a fully general way to handle loss of precision in
ecommerce. This includes handling cases where things added to a cart for
example cause overflow.

On Tuesday, 2 September 2014, Mathias Verraes <notifications@github.com>
wrote:

> In src/Money.php:
>
> > +     * Asserts that an integer value didn't become something else
> > +     * (after some arithmetic operation)
> > +     *
> > +     * @param numeric $amount
> > +     *
> > +     * @throws OverflowException If integer overflow occured
> > +     * @throws UnderflowException If integer underflow occured
> > +     */
> > +    private function assertIntegerBounds($amount)
> > +    {
> > +        if ($amount > PHP_INT_MAX) {
> > +            throw new OverflowException;
> > +        } elseif ($amount < ~PHP_INT_MAX) {
> > +            throw new UnderflowException;
> > +        }
> > +    }
>
> I don't really see the point. If you have 92233720368547758.07 EUR/USD/...
> then you probably didn't make that using this library :-) Oh well, happy to
> merge it.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mathiasverraes/money/pull/55/files#r16972250>.
>