sphde: Refactor sasulock

Remove trailling whitespaces and use printf instead of std::cout.
sphde: Refactor saslockl and sasmlock

Remove trailling whitespaces, use printf instead of std::cout, and
remove exception throwing in internal class.