Lock store credit before modifying.

This prevents a potential race condition where store credit can be
consumed by multiple checkouts happening simultaneously.

As with most race conditions, it's difficult to replicate in a test
environment, but this will now lock the store credit prior to
modification, so that modifications happen within a transaction with the
correct up to date values.
Merge pull request #9 from gmacdougall/lock-store-credit

Lock store credit before modifying.