[erl-frontend] Extract Erlang field loading into helper method
[erl-frontend] Extract Erlang field loading into helper method

Summary: Small refactor, extract Erlang field loading into a helper method. If the field cannot be loaded that indicates an invalid reference, which should not happen for Erlang so we crash in that case.

Reviewed By: jvillard

Differential Revision: D31055437

fbshipit-source-id: 486574b0c

facebook/infer,facebook/infer,facebook/infer,jvillard/infer,jvillard/infer,jvillard/infer,facebook/infer,jvillard/infer,facebook/infer,jvillard/infer,facebook/infer,facebook/infer,jvillard/infer,jvillard/infer