Make the template and env yaml parsing more consistent

in the environment_format.py use the same yaml_loader

Partial-bug: #1242155
Change-Id: I66b08415d450bd4758af648eaff0f20dd934a9cc
Catch all yaml exceptions

Instead of catching 2 specific exceptions, rather catch the generic
YAMLError as the documentation suggests:
http://pyyaml.org/wiki/PyYAMLDocumentation#YAMLError

Closes-bug: #1242155
Change-Id: I840d5eccafcc576d7a0022d81e5bc50af2d77803
Add a test for TimeoutInMinutes accepting a str int

The nested stack resource should accept a number as a string
for TimeoutInMinutes.
The actual fix has been fixed by: https://review.openstack.org/#/c/52564/
but this just proves it.

Change-Id: I769a34eb536177b405a585158df383bbd3021cf9
Partial-bug: #1240903
Imported Translations from Transifex

Change-Id: Id2d5ec30a4ab3dd9b438f0c3c3f98ba5a94d886c
Merge "Add a test for TimeoutInMinutes accepting a str int"
Merge "Make the template and env yaml parsing more consistent"
Merge "Catch all yaml exceptions"
Add granularity option to purge_deleted

Allow users to choose how many days, hours, minutes, or seconds to preserve
deleted data.

Closes-bug: #1237195

Change-Id: I9227f5bf53c5b099a7a691a49c4ff2f5f0662098
Move db_sync into the sqlalchemy DB api.

heat-manage db_sync is currently broken because
heat is trying to use two backends with the Oslo DB
api which is configurable via heat.conf where only
a single DB api can be specified.

Currently this defaults to:

 #The backend to use for db (string value)
 #db_backend=heat.db.sqlalchemy.api

To fix things we:

1) merge heat/db/migration.py into heat/db/api.py.

2) Add db_sync and db_version calls to heat/db/sqlalchemy/api.py
  which call into the functions in heat/db/sqlalchemy/migration.py.

3) Remove the old heat/db/migration.py module (no longer needed).

In the process we also move the INIT_VERSION constant into
heat/db/sqlalchemy/api.py where it is actually used
anyway. (it probably shouldn't have been in the higher level
migration module to begin with)

This should fix SmokeStack which stopped working last Wednesday
with a05dc4b9cdf348ca1ec414fd505256a6760ad17c

Also,
Closes-bug #1241865

Change-Id: I50d489531056016c762bd3be047e3a129cbee4f8
Merge "Add granularity option to purge_deleted"