TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink

Reviewers: DavidC, JP

ChangeLog:
- Update Platform.yml apidoc.
- Added NativePlatformInterface to support native platform stuff.
- Implemented batteryLevel, batteryState, osname, name, runtime properties.
- Added constants describing battery states.
- Added TiPlatform class storing all Platform properties.
- Added methods to TiPropertyMapObject for adding properties with getter callback.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
var win1 = Titanium.UI.createWindow({
    backgroundColor:'#F00'
});

var label1 = Ti.UI.createLabel({
	font: {fontSize:12},
	color:'green',
	top: 200
});

label1.text = Ti.Platform.batteryLevel.toString();
// label1.text = Ti.Platform.getOsname();
// label1.text = Ti.Platform.runtime;
// label1.text = Ti.Platform.getName();
// label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
win1.open();
////////////////////////////////////////
#Some more info....
TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink ver2

Reviewers: DavidC, JP

ChangeLog:
- Update Platform.yml apidoc.
- Address comments.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
 var win1 = Titanium.UI.createWindow({
 backgroundColor:'#F00'
 });

var label1 = Ti.UI.createLabel({
 font: {fontSize:12},
 color:'green',
 top: 200
 });

label1.text = Ti.Platform.batteryLevel.toString();
 // label1.text = Ti.Platform.getOsname();
 // label1.text = Ti.Platform.runtime;
 // label1.text = Ti.Platform.getName();
 // label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
 win1.open();
 ////////////////////////////////////////
TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink ver3

Reviewers: DavidC, DavidL

ChangeLog:
- Address comments.
- Make BatteryInfo class member.
- Rename TiPlatform to TiPlatformObject.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
 var win1 = Titanium.UI.createWindow({
 backgroundColor:'#F00'
 });

var label1 = Ti.UI.createLabel({
 font: {fontSize:12},
 color:'green',
 top: 200
 });

label1.text = Ti.Platform.batteryLevel.toString();
 // label1.text = Ti.Platform.getOsname();
 // label1.text = Ti.Platform.runtime;
 // label1.text = Ti.Platform.getName();
 // label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
 win1.open();
 ////////////////////////////////////////
TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink ver4

Reviewers: DavidC, DavidL

ChangeLog:
- Address comments.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
 var win1 = Titanium.UI.createWindow({
 backgroundColor:'#F00'
 });

var label1 = Ti.UI.createLabel({
 font: {fontSize:12},
 color:'green',
 top: 200
 });

label1.text = Ti.Platform.batteryLevel.toString();
 // label1.text = Ti.Platform.getOsname();
 // label1.text = Ti.Platform.runtime;
 // label1.text = Ti.Platform.getName();
 // label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
 win1.open();
 ////////////////////////////////////////
TIMOB-9897 Blackberry: address comments from Martin's review

This patch is to address comments from Martin.  JIRA issues have been created to track omments that require more time to resolve.

Changelog:
- created enum for NATIVE_ERROR for consistency with the rest of the file
- added comment in NativeObjectFactory::createNativeObject stating where the created instances live and get deleted
- added deleteInstance function to NativeStringInterface so we can delete it at shutdown time
- added comment to empty methods onCreateStaticMembers and onSetProperty in TiObject class
- added comment for overriding onSetProperty in .h
- moved using namespace lines from TiV8EventContainer.h to cpp
- removed unneeded forward declaration of TiInternalEventListener
- moved TiInternalEventListener comment just before class declaration
- release the TiRootObject at the end of script execution so it gets deleted properly
- Added asset path to the js scripts for tibbtest

Tests:
- Built and ran app.js (provided in JIRA ticket)
=> Made sure that the event handling still works
=> Used String.format to make sure the modification to delete the instance didn't break it
=> Verified that the deleteInstance code gets invoked when during the app shutdown, using debug logs
TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink ver5

Reviewers: DavidC, DavidL

ChangeLog:
- Address comments.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
 var win1 = Titanium.UI.createWindow({
 backgroundColor:'#F00'
 });

var label1 = Ti.UI.createLabel({
 font: {fontSize:12},
 color:'green',
 top: 200
 });

label1.text = Ti.Platform.batteryLevel.toString();
 // label1.text = Ti.Platform.getOsname();
 // label1.text = Ti.Platform.runtime;
 // label1.text = Ti.Platform.getName();
 // label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
 win1.open();
 ////////////////////////////////////////
Merge branch 'platformBranch', remote-tracking branch 'upstream/blackberry' into platformBranch

#Some more info....
Merge branch 'platformBranch', remote-tracking branch 'upstream/blackberry' into platformBranch

Conflicts:
	blackberry/tibb/TiTitaniumObject.cpp
TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink ver5

Reviewers: DavidC, DavidL

ChangeLog:
- Fix conflicts with GET_PROPERTY_CALLBACK.

Test Cases:
- Run tibbtest.
- Make sure implemented properties: batteryLevel, batteryState, osname, name, runtime (as well as their getters) works succesfully.
- Use the following app.js snippet:

////////////////////////////////////////
 var win1 = Titanium.UI.createWindow({
 backgroundColor:'#F00'
 });

var label1 = Ti.UI.createLabel({
 font: {fontSize:12},
 color:'green',
 top: 200
 });

label1.text = Ti.Platform.batteryLevel.toString();
 // label1.text = Ti.Platform.getOsname();
 // label1.text = Ti.Platform.runtime;
 // label1.text = Ti.Platform.getName();
 // label1.text = Ti.Platform.getBatteryState().toString();

win1.add(label1);

// open window
 win1.open();
 ////////////////////////////////////////
Merge pull request #87 from alexandergalstyan/platformBranch

TIMOB-9546: BlackBerry: Implement Platform elements needed for KitchenSink
Merge pull request #95 from jpl-mac/timob-9897

TIMOB-9897 Blackberry: address comments from Martin's review
Merge branch 'blackberry' into TIMOB-9454

Conflicts:
	blackberry/tibbtest/bar-descriptor.xml