fix(db): elgg_get_metastring_id should always create and id

fixes #7579

TODO:
 - [x] Add PHPUnit test case for MetastringsTable
 - [x] Fix typo in commit message
While I think this may be acceptable to get this fix in, it *is* possible to test this by mocking the dependencies; it's just a real pain.