Calculate Ceph pg_num based on number of OSDs

Flake8 configuration updated for compatibility with flake8 2.1 and
hacking 0.8.1 (H234 disabled, indentation error fixed in sqlalchemy).

serializer and serialize() extracted from child classes into
OrchestratorSerializerTestBase to reduce code duplication.

Change-Id: I684f7a5e692e8d063435890c61efd3756e254d09
Partial-bug: #1294579
Signed-off-by: Dmitry Borodaenko <dborodaenko@mirantis.com>
Merge "Calculate Ceph pg_num based on number of OSDs" into stable/4.1