2 new init methods LiquidPackage, Value and Variable

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
[Fix] return NSNull instead of nil (LQLiquidPackage)

A `[NSNull null]` was being returned instead of returning a `nil`.
This can cause a crash on the app. So, older versions of the SDK than this commit
should not receive a `null` from the server.

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Move inBackground from lazy initialization to init

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Remove inBackground property check from bg/fg delegates

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Move position of startFlushTimer inside init

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Rename LQQueue to LQRequest

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
[Refactor] Network stuff to LQNetwork + some adjustments

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Use a copy of user identifier on alias method

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Merge branch 'master' into refactoring

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>

Conflicts:
	Liquid/Liquid.m
Cleaning code

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Remove unnecessary copy on User alias method

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Serialize DP to json outside of queue + atomic

on DP main entities (User, Device, Session, Device, DataPoint).

This solves a lot of concurrency problems and reduces consumption of memory.

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Fix tests that now use a single Liquid instance

instead of Liquid singleton.

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Review of memory management and concurrency

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Use a single instance per spec test

No more sharedInstances on kiwi tests.

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Merge branch 'master' into refactoring

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>

Conflicts:
	Liquid/LQDefaults.h
	Liquid/Liquid.m
Fixes on tests

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Return unmutable dicts on jsonDictionary: methods

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Add tests for LQUser "copy" method

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>
Better log messages

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>