Fix bug for issue 5462, initial pin value not retained
Fix bug for issue 5462, initial pin value not retained

For api usage like DigitalOut led(LED1, 1) the hal function gpio_write()
sets the output before f. gpio_mode() is called. gpio_mode() clears the
output as it take never writen parameters (gpio_cfg_t.init_hight).

This patch use internal hardware register of GPIO output instedad of above paramiter latch
for retaining proper writen state.

Archcady/mbed-os,ryankurte/mbed-os,andcor02/mbed-os,karsev/mbed-os,kjbracey-arm/mbed,CalSol/mbed,andcor02/mbed-os,mazimkhan/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,karsev/mbed-os,mbedmicro/mbed,betzw/mbed-os,mazimkhan/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,karsev/mbed-os,karsev/mbed-os,c1728p9/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,mbedmicro/mbed,mbedmicro/mbed,kjbracey-arm/mbed,c1728p9/mbed-os,Archcady/mbed-os,andcor02/mbed-os,Archcady/mbed-os,kjbracey-arm/mbed,mazimkhan/mbed-os,ryankurte/mbed-os,CalSol/mbed,andcor02/mbed-os,Archcady/mbed-os,betzw/mbed-os,mbedmicro/mbed,karsev/mbed-os,ryankurte/mbed-os,mbedmicro/mbed,CalSol/mbed,CalSol/mbed,CalSol/mbed,mazimkhan/mbed-os,ryankurte/mbed-os,betzw/mbed-os,Archcady/mbed-os,ryankurte/mbed-os,ryankurte/mbed-os,mazimkhan/mbed-os,CalSol/mbed,andcor02/mbed-os,karsev/mbed-os,Archcady/mbed-os,betzw/mbed-os,mazimkhan/mbed-os