Make the memoize decorator pass through kwargs

The old memoize didn't handle key word arguments at all, this version
will call the function correctly, without any caching happening. If it
proves to be necessary in the future, it shouldn't be too hard to add the
caching in for the kwargs form as well.