std: add interface for getting current stack bound

Closes #11293