Fix HTTP client library state machine
Fix HTTP client library state machine

There are two issues in the HTTP client library state machine: one is
not properly generating the credential data, and the other one is trying
to keep receiving data from the server when there's no more data to be
received. By fixing these two issues, now the state machine can
function properly.

Resolves: LE-14008
Related: LE-14234 LE-14299 LE-14193 LE-14153 LE-14154 LE-14325 LE-14282
Change-Id: Iaa9dbb62f7cb6d9139fbcbe1c723946dc791bbc1

legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af