Beware that the whole unsafe rewind thing is to load states faster, without some sanity checks. Using this unproperly could result in a desync.
Lua has no access to all the save states files because they can be saved on arbitrary places. The default place to save states is set under Config > Settings > Advanced > Path Save Slots. The prefix of movies and saves can be chosen while creating a new movie.
Loading inputmovie object from lsmv file without loading the state: cannot yet. Hacky way that Ilari told me at #lsnes IRC:
http://codepad.org/i4awK16k
Saving non-current-inputmovie object to lsmv file: you can save the input member alone with movie.serialize. Maybe, you can save the complete lsmv with ZIPWRITER and this file.
Saving/Loading a state:
Language: lua
local default_base = settings.get("slotpath")
local slot = 1
-- save:
local cmd = string.format([[save-state %s/movieslot%d.lsmv]], default_base, slot) -- hack
local cmd = "save-state $SLOT:" .. slot -- better
exec(cmd)
-- load
local cmd = string.format([[load-state %s/movieslot%d.lsmv]], default_base, slot)
local cmd = "load-state $SLOT:" .. slot -- better
exec(cmd)