TIMOB-8920: Blackberry: Add support for building/running on device

[Issues Fixed]
TIMOB-8920: Blackberry: Add support for building/running on device

[Changes]
blackberryndk.py
- function package
  - add debugToken and use it
- function __runUnitTests
  - fix parameter

builder.py
- function run
  - add debugToken and use it
- function __main__
  - add --debug_token argument and output the usage if not there for --type device
  - centralize arg decoding

[Tests]
Test 1: Build and deploy to device
1) Deploy debug token on device
2) Create a project using project.py
3) Run the following command:
builder.py run -t device --ip_address=<ip address> -p <password> -d <project path> -n <ndk path> --debug_token <path to debug token>
4) Verify the app gets built and deployed on the device
Merge branch 'master' into TIMOB-8920_01

Conflicts:
	support/blackberry/builder.py
TIMOB-9309: BlackBerry: Convert argparse to optparse part2

Reviewers: DavidL, JP

ChangeLog:
- Convert to optparse for blackberry.py blackberryndk.py scripts

Test Cases:
- Create sample project using project.py.
- Make sure project successfully created.
- Make sure blackberry and blackberryndk scripts correctly run the unit testa with -t option.
- Make sure created project can be successfully built and run.
TIMOB-8920: Blackberry: Add support for building/running on device

Moved param checking to a central location and added --debug_token to usage
TIMOB-9309: BlackBerry: Convert argparse to optparse part2 ver2

Reviewers: DavidL, JP

ChangeLog:
- Convert to optparse for blackberry.py blackberryndk.py scripts

Test Cases:
- Create sample project using project.py.
- Make sure project successfully created.
- Make sure blackberry and blackberryndk scripts correctly run the unit testa with -t option.
- Make sure created project can be successfully built and run.
TIMOB-9309: BlackBerry: Convert argparse to optparse part2 ver3

Reviewers: DavidL, JP

ChangeLog:
- Convert to optparse for blackberry.py blackberryndk.py scripts

Test Cases:
- Create sample project using project.py.
- Make sure project successfully created.
- Make sure blackberry and blackberryndk scripts correctly run the unit testa with -t option.
- Make sure created project can be successfully built and run.
Merge pull request #74 from alexandergalstyan/optparseBranch

TIMOB-9309: BlackBerry: Convert argparse to optparse part2
Merge pull request #70 from dlifshitz-maca/TIMOB-8920_01

TIMOB-8920: Blackberry: Add support for building/running on device

[Issues Fixed]
TIMOB-8920: Blackberry: Add support for building/running on device

[Changes]
blackberryndk.py
- function package
  - add debugToken and use it
- function __runUnitTests
  - fix parameter

builder.py
- function run
  - add debugToken and use it
- function __main__
  - add --debug_token argument and output the usage if not there for --type device
  - centralize arg decoding

[Tests]
Test 1: Build and deploy to device
1) Deploy debug token on device
2) Create a project using project.py
3) Run the following command:
builder.py run -t device --ip_address=<ip address> -p <password> -d <project path> -n <ndk path> --debug_token <path to debug token>
4) Verify the app gets built and deployed on the device
TIMOB-9279: BlackBerry: Add --blackberry-device and --blackberry-password to drillbit

[Issues Fixed]
TIMOB-9279: BlackBerry: Add --blackberry-device and --blackberry-password to drillbit

[Changes]
drillbit.py
- added usage

blackberry.js
- function BlackBerrySimulator
  - store the blackberry args
- function createDeviceManagementProcess
  - replace the unused args with the used ones
- functions isTestHarnessRunning, pushTestJS, launchTestHarness, killTestHarness
  - use the builder process instead of devicemanagement

builder.py
- functions __init__, __name__
  - add useLogFile param to direct output to log file or stdout based on the command
- function run
  - move the package name to a reusable function getPackage
- added functions terminateApp, isAppRunning, printExitCode, getFile, putFile, appLog
- function __name__
  - added usage, options, and handling for the new commands

devicemanagement.py
- use optparse instead of argparse
- move package-related commands to builder.py

[Tests]
Test 1: Run drillbit
1) Run scons to build the mobile sdk
2) Run the following command:
drillbit\drillbit.py --platforms=blackberry --blackberry-device=<ip address>
3) Click "run tests"
4) Verify the test_harness app is built, deployed, and run
5) Verify the logs are printed
Note: The test will fail because some things aren't implemented
Merge pull request #72 from jpl-mac/timob-9388

TIMOB-9388 Blackberry: implement String.format
TIMOB-9279: BlackBerry: Add --blackberry-device and --blackberry-password to drillbit

fix usage and required
Merge pull request #78 from dlifshitz-maca/TIMOB-9279_02

TIMOB-9279: BlackBerry: Add --blackberry-device and --blackberry-password to drillbit

[Issues Fixed]
TIMOB-9279: BlackBerry: Add --blackberry-device and --blackberry-password to drillbit

[Changes]
drillbit.py
- added usage

blackberry.js
- function BlackBerrySimulator
  - store the blackberry args
- function createDeviceManagementProcess
  - replace the unused args with the used ones
- functions isTestHarnessRunning, pushTestJS, launchTestHarness, killTestHarness
  - use the builder process instead of devicemanagement

builder.py
- functions __init__, __name__
  - add useLogFile param to direct output to log file or stdout based on the command
- function run
  - move the package name to a reusable function getPackage
- added functions terminateApp, isAppRunning, printExitCode, getFile, putFile, appLog
- function __name__
  - added usage, options, and handling for the new commands

devicemanagement.py
- use optparse instead of argparse
- move package-related commands to builder.py

[Tests]
Test 1: Run drillbit
1) Run scons to build the mobile sdk
2) Run the following command:
drillbit\drillbit.py --platforms=blackberry --blackberry-device=<ip address>
3) Click "run tests"
4) Verify the test_harness app is built, deployed, and run
5) Verify the logs are printed
Note: The test will fail because some things aren't implemented
TIMOB-9398: Get standard JS keywords to work in V8
Reviewers: Alex, Harut

Change Log:
- created a separate template for global objects
- moved “completeInitialization()” to be called when control is opened or added to another control
- changed colour parsing to be more tolerant of the type
- changed string parsing to call “ToString” if not already a string
- removed “string” from global namespace
- removed Ti object tracking in global namespace

Test Cases:
- build tibb
- build tibbtest
- run tibbtest on simulator
- a label with the current date should appear
- a slider should appear
- a button should appear
- a progress bar should appear
- move the slide
- the value of the slide should appear as the label
- the label should move up and down with the slider

https://jira.appcelerator.org/browse/TIMOB-9398
Merge branch 'formatBranch'; commit '3c93b467' into formatBranch

Conflicts:
	blackberry/tibb/TiRootObject.cpp
Merge branch 'formatBranch', remote-tracking branch 'upstream/blackberry' into formatBranch

#Some more info....
TIMOB-9390: Blackberry: implement rest of String.formatXXX methods (other than format) ver3
Reviewers: HarutM, JP

Review the 99130f8

ChangeLog:
- Remove TiDateObject class.
- Address comments.

Test Cases:
- Using sample tibbtest project create var with the value of Date
- Use formatDate(date, [format]), formatTime(date, [format]) in app.js
- Make sure string correctly formatted.
- Try the same with previously changed language.
- Create var with number value.
- Use formatCurrency(number) in app.js
- Make sure string correctly formatted.
- Try the same with previously changed language.
- Create var with number value.
- Use formatDecimal(number, [locale], [pattern]) in app.js
- Make sure string correctly formatted.
- Try the same with previously changed language.