Change order populator to handle invalid variant_id and quantity values

* Refactor code and specs to cover all the cases.
* Change the caller code to pass in variant_id and quantity coerced to
  integers, rather than strings.