[LPC1549] Fixed SPI frequency issue

Fixed SPI frequency issue when new frequency is not divided by system
clock.
Optimised power/clock setting code
Some code refactoring.