Move get_struct_metadata out of detailed namespace
Move get_struct_metadata out of detailed namespace

Summary:
In addition, there are other small changes

1. Explicitly specify return type
2. Don't use std::array to cast rvalue to lvalue -- define proper variable instead.

Reviewed By: iahs

Differential Revision: D30516699

fbshipit-source-id: d7f46ec97f0ab73d4040406d39affc2d330724eb

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift