Tighten up try/except block around rpc call

The try is too broad.  This commit moves code outside of the try block
where exceptions are not expected to be raised.  This only leaves the
rpc call in the current code.  In legacy code, there used to be more
but now this code merely queues updates for workers to handle
in other threads.

Change-Id: I15407553fc6ad6eeb5b483499fe1a5adffe1edca
Fix incorrect exception order in _execute_request

_execute_request has a list of exception handlers to log various types
of errors with more specific error messages. Unfortunately, it catches
requests.exceptions.ConnectionError before requests.exceptions.SSLError,
but ConnectionError is a superclass of SSLError so the latter is never
invoked.

This change corrects the exception handling order, and enables the
bad-except-order pylint check now that the check passes.

Change-Id: I92bacd6088de5cbc170bc5c081a1db1baeec69e7
Closes-Bug: #1360970
Remove unused variables from get_devices_details_list

Initialization of res with empty list is not needed because
res is always assigned with a new value in try/except block.

A method invocation context is created in get_device_details
and need not be initialized in get_devices_details_list because
it is never used there.

Change-Id: I2ff73390ca173cee6d73aaafdcc0c525670e358b
MeteringPluginRpc: Fix crash in periodic_task

Restore __init__ chain which has been broken by
commit bdcc5a46d7776f50d5ae372798a913349629d2f6 .

Closes-Bug: #1396893
Change-Id: Ia1f0357b6726ac79a22ed1666eecebac33689aa1
Merge "MeteringPluginRpc: Fix crash in periodic_task"
Merge "Fix incorrect exception order in _execute_request"
Merge "Remove unused variables from get_devices_details_list"
Merge "Tighten up try/except block around rpc call"