Fixed tonnes of -Wmissing-prototypes warnings

Just added 'static' in front of many private functions.

Change-Id: I892a46d684e00a44e7f84a7343e2cf5690f07eed
Merge topic 'Wmissing-prototypes' into master

d9313162 Fixed tonnes of -Wmissing-prototypes warnings