Add a mutex to attribute_assignment()

Guard attribute_assignment() against multiple threads accessing
this function simultaneously. Avoids errors like
NoMethodError: undefined method `customer_id=' for #<Username ..>

--

I think global mutex is very wrong way to do this, but
@mutex ||= Mutex.new
 just didn’t work. If you know proper idiom of how to implement this, please tell me and I’ll fix this.

I found this by implementing multithreaded application with JRuby, I think this won’t be triggered with GIL locked threads as with MRI.