[HttpFoundation][NamespacedAttributeBag] Refactoring of resolveKey() method

Just code enhancement. Low priority.

1) We don't need to call strlen($name) as last arugment of substr() function
2) We don't need to call strrpos (or strpos) two times.