htp layer: add memory cap counter

This patch adds a memcap counter for HTP memory usage. Counter
is increased each time an allocation is not done due to the memcap.