Remove trailing None on calls made to the Magento's API (PHP 5.4 compatibility)

When Magento is used with PHP 5.4+, the API may return errors if we send
API calls with None in the last arguments. So, we remove all the trailing
None from the arguments before sending.