In particular, operations on Dict keys will turn List elements to Strings, but many clients expect to work with numbers, for example when working with tabpagebuflist(). Though the mapping is short and easy, it's been used in several places already, and having a small abstraction still is nice.
As the optional str2nr() arguments complicate the invocation and are rarely used, let's define a special case for that.