record.load: Require constructor to be a function
record.load: Require constructor to be a function

libgtop (available at https://github.com/GNOME/libgtop/commits/master) has a
struct glibtop_cpu. While trying to load this through e.g.
require("lgi").GTop.glibtop_cpu, the following error occurred:

  lgi/record.lua:153: attempt to index a nil value (field 'return_type')

This occurred because the code tried to find a constructor for this struct and
for this it "un-camel-cased" the struct name, which didn't change anything,
because the struct name isn't camel-cased, and then assumed that the result were
information about a function. However, this just found the struct again.

Fix this by explicitly testing if the type of the result is a function.

Signed-off-by: Uli Schlachter <ede10f140ad8f5ad90197d17839fb90345d66dd4@informatik.uni-oldenburg.de>

psychon/lgi,pavouk/lgi