Return 0 instead of -1 for unknown/non-exposed ramBytesUsed()

The accountable interface specifies that such values are illegal

Fixes #8239