Use GSList instead of obscured GQueue

:Release Notes:

:Detailed Notes:
List of pattern specs used to be kept in GQueue for inbound and
outbound permissions. We need a more transparent data structure to
compare two lists for equality efficiently.
We're going to keep inbound and outbound permissions in sorted lists.
Then we'd be able to compare them element-wise in a single pass.

:Testing Performed:
Build and automatic tests

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I125298f7bcfefaa662ec4a50b78ab49a3830b28d
Reviewed-on: https://g2g.palm.com/5913
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Keep in/outbound patterns in a sorted list

:Release Notes:

:Detailed Notes:
Sort inbound and outbound pattern specs by their string
representations. This is needed for efficient comparison for equality.

:Testing Performed:
Build and automatic tests

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: Ib958db7d73195691c86c14824f83fd666a03fd3a
Reviewed-on: https://g2g.palm.com/5914
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Fix test_client.cpp test passing under valgrind

:Release Notes:
fix test_client.cpp test passing under valgrind check

:Detailed Notes:
fix test_client.cpp test passing under valgrind check
implemented custom using of glib contexts
instead of using custom sleeps to wait results from another threads

:Testing Performed:
make ExperimentalMemCheck

:QA Notes:

:Issues Addressed:
[BHV-6893] LS2: integration tests fails

Open-webOS-DCO-1.0-Signed-off-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>

Change-Id: Ib1698e752a95af26da996ed70df686eaee145741
Reviewed-on: https://g2g.palm.com/5818
Reviewed-by: DCO Verification
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Tested-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Warn on duplicated services in permission map

:Release Notes:

:Detailed Notes:
Some executable abuse LS2 security, and declare services with the same
name in different role files. This result in clashes in the global
permission map. Fortunately, everything can work as expected as long as
the duplicates are exactly equal. This is particularly true for the
anonymous service.

:Testing Performed:
Build, automatic tests and Mini BAT.

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: Ib960a22d40bbdf5e7b33b14c140e23a291b345af
Reviewed-on: https://g2g.palm.com/5915
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Fix monitor timestamps

:Release Notes:
Fix monitor timestamps to work with interruptions properly

:Detailed Notes:

:Testing Performed:

:QA Notes:

:Issues Addressed:
[BHV-6153] timestamps in ls-monitor output do not always reflect
           the order in which events occurred in the system

Open-webOS-DCO-1.0-Signed-off-by: Alexandr Smoktal <alexandr.smoktal@lge.com>

Change-Id: Iabf49fceadc1ad7cc1b67cda65d456b8439a7bfd
Reviewed-on: https://g2g.palm.com/5952
Reviewed-by: DCO Verification
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Tested-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Add unit test for LSHubPermissionIsEqual

:Release Notes:

:Detailed Notes:

:Testing Performed:
Build and unit tests

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I06a5b6413cfc75bf7747f46d3f7768a72d525e28
Reviewed-on: https://g2g.palm.com/5918
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Print details of permissions conflict

:Release Notes:
Print duplicated permissions from the map to help debugging.

:Detailed Notes:

:Testing Performed:
Build, automatic tests and Mini BAT

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: If58910e202d5d26021a9752e4022fe670299d297
Reviewed-on: https://g2g.palm.com/5921
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Merge branch 'bhv-9332-permissions' into develop

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Declare minimum version gcc-4.7 in README

:Release Notes:
Require at least gcc-4.7 to build luna-service2
Adjust version to 3.9.3

:Detailed Notes:
Version gcc-4.6 lacks many features of C++11, which can be useful for
further development of luna-service2.
It is easy to get 4.7 on Ubuntu 12.04 for desktop development.

:Testing Performed:
Trivial change. Build + automated tests.

:QA Notes:

:Issues Addressed:
[BHV-10401] Update README to declare minimum required version of gcc is 4.7

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I6c2905d8b6535de603d28dde84fb2815cacec791
Reviewed-on: https://g2g.palm.com/5979
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Debug messages instead of warnings for duplicates

:Release Notes:
Get rid of warnings when identical permissions are duplicated.

:Detailed Notes:

:Testing Performed:
Build, smoke test on device.

:QA Notes:

:Issues Addressed:
[BHV-9332] Multiple ls-hub errors registering media pipeline

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I5f0743d8265a5cb20ec51b927a04ec0bfdc2f05d
Reviewed-on: https://g2g.palm.com/5983
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Merge branch 'develop'

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>