Add new middleware builtin: Lock

This will do a process lock by flocking a file. If it fails, it will
raise an exception of choice.