Avoid modifying default function arguments

Modifying passed arguments inadvertently is an easy pitfall in python.
Even more serious is modifying the default value to a function, since
that modification will be preserved across future function calls.

The typical defense against the latter is to avoid using mutable default
values.

This change replaces several def foo(bar=[]) with bar=() or similar, and
then fixes a few cases that were exposed where the argument was indeed
permanently modified.

Change-Id: I3d04dcb39e3816942f8e80ce499c47d774a773c6
Remove unnecessary get_status_code wrapper function

Function get_status_code is used to get HTTP status code from
either requests.Response (status_code) or Webob.Response
(status_int). The latter was removed in 2012 and not needed
anymore.

Change-Id: Iacd6bbb83ce0d8ec5b8ec73273bc7bf39c9ccc8d
Merge "Remove unnecessary get_status_code wrapper function"
Merge "Avoid modifying default function arguments"