Binary heap implementation in Lua
