REV: add utils app

Change-Id: Id979e45a9feb621c6f795aac7d9a163e25e7e994
SQL: convert column type, add composite index and add migrate sql for each release version.

[TCMS-240] Change object_pk of all content type models to PositiveIntegerField rather than TextField

1.Alter tables tcms_logs, tcms_bookmarks, tcms_contacts, tcms_linkrefs column object_pk type from Text to Int and add a composite index on content_type_id, object_pk and site_id.
2.Separate the upgrade or downgrade DDL sql from nitrate_db_setup.sql for migrating from different release version.
  For example:
      * nitrate_db_upgrade_vA.B.C_vD.E.F means that upgrade the database schemas from vA.B.C to vD.E.F
      * nitrate_db_downgrade_vA.B.C_vD.E.F means that downgrade the database schemas from vA.B.C to vD.E.F

Change-Id: I3842a5464b5c8d96c48fccd53c68d0bb1991b975
FIX: Add BUGZILLA_EXTERNAL_TRACKER in settings.

TCMS-264 Temp workaround to avoid updates automatically bugzilla with TCMS test case ID.
Change-Id: I5707800c2ce6fae5c22ba2f3719d98f68e2e366d
 REV: bump release to 3.8.7-3

Change-Id: I423e2bbd8b2542de32ad1f55071114d2d315787d
FIX: optimize /run/<run_id>/

TCMS-259 - [Performance] optimize SQL queries while opening a run page

First try to optimization, reduce the number of queries on test_case_runs from
6 to only 1.

Problem still there so far. The original implementation uses
QuerySet.select_related to get all related objects, such as tested_by,
assignee, priority, this leads to generate a big SQL query that joins many
tables and big data will be sent back from MySQL sever.

Change-Id: I27098104e8b352dea33056544b1f085526b7dbd2
REV: avoid store whole QuerySet data in memory during serialization

Change-Id: Icbdd0ef720d5f0f2f750daadc2d33e27254f2447
REV: add missing index in TestCasePlan model

Change-Id: Ic05d8d02ff30b4f7a9a0fa54847e56c973909e2a
FIX: remove unnecessary ordering in meta

This commit aims to avoid unnecessary ordering operation in db server. If need
such ordering ability in Admin site, modify related Admin class in admin.py

Change-Id: I52bdfba7e8fa4cc375ebed2aae9b8beeaadb8815
REV: using dict comprehension instead of dict()

Change-Id: I5748d4c1d5183c3afe6eb15d4ff3dc0d884774fd
REV: saving two SQL queries from unlink_plan

Change-Id: I6ee2a989ae119f45520e2fae839cfe51178b7035
REV: unique index on test_case_run_status.name

Change-Id: Ifef3363593312b00276de62b9461bf3a16b86ad7
REV: modify models Contact, Bookmark, LinkReference and TCMSLogModel column object_pk type from TextField to PositiveIntegerField.

[TCMS-240] Change object_pk of all content type models to PositiveIntegerField rather than TextField

Change-Id: I44d08c076e6efd282ced34656690512ab18a909f
REV: make the checkbox Automatically be unchecked by default.

[TCMS-220] Don't make Automatically be checked by default to avoid annoying user by jumping to next caserun automatically.

Change-Id: Ic0ffa0eecb4d53f27005b54b013b11044457f4fb
REV: optimize TestCaseRun re-order performance.

[TCMS-253] [Performance] improvement when ordercaserun

* Using raw sql instead of django orm to update sork key.
* Using xrange to generate sork key.
* Using izip to generate (sort key, case_run_id) tuple for raw sql parameter
* /run/case_run_id/ get test case runs order by sork key by default.

Change-Id: I52fdc876d9b809c508c5defe61e57e512afe8648
REV: optimize run/<run_id>/report/

TCMS-246 - [Performance Test] Run Report respond slowly

Change-Id: I0e4f475440f508b2799d621be07dae40a59c9085
REV: log namespace of each XMLRPC method invocation

TCMS-94 - [XMLRPC] As a superuser, I want to see the object name as well in the
Method field, so that it can help to get more information with more details

Change-Id: Ia710dca896b004317558bf62dee612f750c936f5
FIX: compatible with Python 2.6

Change-Id: I1dc7f6d46b5443eaafb7d892ee1cbb2466ce4fda
FIX: remain Python 2.6 compatible error

Change-Id: I17ebbe7a0a2f727ea8792138b9cc4fbecf7618b5
REV: lazy query on ManyToManyFields during serialization

Purpose of this lazy query is to avoid queries when no model data queried from
database.

Change-Id: Id033220a327b1fdc9235f21bdf420dfc6e9e1465
FIX: argument name typo when calling log_call

Change-Id: I3158ec8f6e2e8cc4f54b999c585b65915d651b27