Solve No Previous Prototype GCC warning

In some cases there were missing includes of own
header files from implementation files.

In other cases moved function which are only used
within single file into an anonymous namespace.

Change-Id: I2c6b411bcfbc521e2a5f21265dc8e009a548b1c8
8 files changed