Add call trace in error message

Call trace can help user to locate problem quickly.

stack.sh uses bash as interpreter, which defines a series of
"Shell Variables":
BASH_SOURCE:
An array variable whose members are the source filenames

BASH_LINENO:
An array variable whose members are the line numbers in source
files where each corresponding member of FUNCNAME  was  invoked.

FUNCNAME:
An array variable containing the names of all shell functions
currently in the execution call stack.

run "man bash" and search the variable name to get detailed info.

In function backtrace, it gets the call deepth from
${#BASH_SOURCE[@]}, then print the call stack from top to down.

In function die, backtrace is called with parameter "2" to ignore
the call trace of function "die" and "backtrace".

I add a broken function in lib/database, and call it in stack.sh,
the output looks like this:

[Call Trace]
./stack.sh:104:broken
/home/kui/osd/devstack/lib/database:24:die
[ERROR] ./stack.sh:24 It is broken

Fixes bug # 1207660

Change-Id: I04d0b3ccf783c769e41582c20f48694c19917334
Merge "Add call trace in error message"