sqlite is probably one of the best engineerd pieces of software on the planet and the most used database. if you want to learn more about how the sqlite team thinks about reliability i strongly recommend watching the following talk Richard Hipp gave recently
https://www.youtube.com/watch?v=V_qzqY1bb7Iso i tend to agree, you rewrite sqlite you will end up with an inferior product