Added device PIN functions [SECURITY]

Added the security functions for setting, getting and updating a PIN number for a device.

Offline functionality in the future will include offline caching of this PIN.