Implement flock struct as userdata

This struct is needed for file locks with fcntl(). The fcntl() doesn't
yet support this as an argument; this is to be done in future commits.