metarestore: Replace std::stoi with atoi

Since std::stoi does not compile on Cygwin we replace it with atoi.

Change-Id: I4c4f1881557377c167a50881fd12f2af7f8c3bc2