use private linkage where possible

Change-Id: I01d27f1c493cf8108a9ff6e488e036bea7bfca12
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>