Add #total_on_hand method to Variant model

Fixes #3427