Digest operations now supports NULL arguments

Hash algorithms should support NULL arguments and zero length strings.
Following changes will make is possible to call TEE_DigestUpdate and
TEE_DigestDoFinal interchangeably.

Following combinations are now working.
   ----------------------------------------
   | TEE_DigestUpdate | TEE_DigestDoFinal |
   ----------------------------------------
   |       NULL       |       NULL        |
   |       NULL       |       MESSAGE     |
   |       MESSAGE    |       NULL        |
   |       MESSAGE    |       MESSAGE     |
   |       N/A        |       NULL        |
   |       N/A        |       MESSAGE     |
   ----------------------------------------

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Tested-by: Joakim Bech <joakim.bech@linaro.org> (FVP)
This give checkpatch error, I'll update this in the next patch.