[cmf-prolog] add type/2 predicate for constants and class members

Summary: I need that to answer some of Dario's questions on www.

Test Plan: unit test included

Reviewers: jcreed, bill, drussi, julienv, eletuchy, pieter

Reviewed By: pieter

Subscribers: platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D1378232
[prolog] put _unknown_ for type/2

Summary: I think it's better to have _unknown_ than nothing.

Test Plan: make tests

Reviewers: pieter, bill

Reviewed By: bill

Subscribers: drussi

Differential Revision: https://phabricator.fb.com/D1380089