Scope temp locals in register_common_api_method_metadata to reduce stack usage

Mitigates #974, attempts to solve https://github.com/BitShares/qt_wallet/issues/79