bugfix: stop infinite pagination when the response is empty

solves #13

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
improvement: separate unpaginated and paginated queries (better readability)

the if conditions in the fetchAllPaginated function were getting more complex. this helps to simplify them by separating paginated from unpaginated fetchAll. It may result in more LoC, but gets more readable

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
adjust tests to new pagination pattern

the old tests were returning empty arrays for valid pagination, which is not true anymore. when empty arrays are returned, it indicates to pagination that it should stop. so the tests were adjusted to return some packages or nodes respectively for valid pagination

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
simplified (reduced) test of node equality

jasmine doesn't consistently seem to handle deep comparisons:
  FAILED Expected [ 'my1.full.fqdn' ] to be [ 'my1.full.fqdn' ].
removing these deep expectations and replacing them with simpler ones (for now).

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
updated imagemin 0.3.0 -> 0.5.0

in hopes of fixing the CI test errors with node 0.8

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Merge pull request #14 from TelekomCloud/bug/infinite-pagination

Looks good. Thanks.