lib/standard/string: Fixed implementation of hash function for Text variants.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Merge: String hash function fix

The generic implementation for hash on Text was not compliant with the optimized version for Strings, however no test was able to catch it since we've never used Buffer and String at the same time in a Hash structure.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

Pull-Request: #455
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>