Application inhibition methods.

Application inhibition code:
  - Add required methods to inhibit logout, switch, suspend and idle of the computer when the application is running.
  - Better real life application framework example.

Add new code to replace deprecated format size method.
Fix primary-toolbar unit test.