Use Query instances as iterables when possible

A Query.all() call creates a list of a DB query results.
We can actually use a Query instance as an iterable and
thus avoid creation of a list if we just need to iterate
over those values only once.

Fixes bug 1173133

Change-Id: I06d8eaa9eaba4c71aa0c98000735cb9d83ea19a3
Improve Python 3.x compatibility

Replace the deprecated except x,y: construct with
except x as y:, as that one works with all Python
versions starting with 2.6.x

Change-Id: I13080cfdad32eaef21aa2707fe5d2818bda68535
Stub out get_networks_count properly for pnet unit tests

Bug 1174457

Change-Id: I30a5c549d5d236124a7798a757601e970067b284
Imported Translations from Transifex

Change-Id: I7f8f822413f4e11310700882540c6e276016b75f
Merge "Improve Python 3.x compatibility"
Merge "Imported Translations from Transifex"
Merge "Use Query instances as iterables when possible"