Upgrade to the latest android SDK and tools.

The latest version of the android command now requires a --target
argument to be specified.
Issue 1743: Use US locale when formatting DB queries.
fix error which made the top panel reload if show timer preference is disabled
Issue 1501: Use unique temporary directory name when importing.
Issue 1501: Close media database after importing.
Add the terms-of-use link to the sign-up form.
Issue1449 workaround: don't return negative times for time taken.

The result of this function is where the time taken per rep is derived. Since it is evident that we are storing negative numbers on some occasions, ensure here that the calculated time is not negative.

Also removed unused method.